On Thu, 20 Feb 2003 10:01:28 +0100, François Van Emelen <[EMAIL PROTECTED]> wrote:


Marcel Kilgus wrote:
Any suggestions?

What about this quick&moderately dirty approach of employing the
existing SBasic parser?

100 r$= '('
110 l$ = ')'
120 f$ = 'UPPER$'
130 v$ = '"ql-smsq"'
140 c$ = f$ & r$ & v$ & l$
150 PRINT Eval$(c$)
160 STOP
990 :
1000 DEFine FuNction Eval$(e$)
1010 LOCal C%, ev$
1020 C% = FOP_OVER('ram1_eval_bas')
1030 PRINT#C%, "OPEN_NEW#3,PIPE_eval"
1040 PRINT#C%, "a$ = "; e$
1050 PRINT#C%, "PRINT#3,a$"
1060 PRINT#C%, "CLOSE#3"
1070 CLOSE#C%
1080 C% = FOP_IN('PIPE_eval')
1090 EX ram1_eval_bas
1100 INPUT#C%, ev$
1110 CLOSE#C%
1120 RETurn ev$
1130 END DEFine

Not as mighty as your solution but good enough for most cases, I
guess.

Marcel

Hi Marcel,
Thank you for your answer.

Wouldn't there be a problem when your Eval$(e$)function is used 1000s of times?
Isn't there a limit to the number of times a channel can be opened and closed in a program?

I don't see why... I've seen some other stuff (ie a little recursive program from Bill Cable a while ago), that was far more brutal than that :-) If that worked, this would work too ;-)


Phoebus
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Reply via email to