Recent Posts

Pages: [1] 2 3 ... 10
1
Code and examples / Re: DJPeter Math Solver in o2
« Last post by Aurel on 19. July 2017, 21:55:31 »
Quote
or is Rod acting as Carl's minion?
Mark
not OR than IS Carl servant,like some others mods on that forum
as i said that place sucks like his new version
what a "new features" sucks too,
Richard have right:in open reply to Carl(my add: super-ultra OOP programmer)
Quote
Carl should have swallowed his pride, learned the true reason for the allocation failures (rather than trying to blame Microsoft)
that explain a lot
2
Code and examples / Re: DJPeter Math Solver in o2
« Last post by B+ on 19. July 2017, 16:11:01 »
I thought that most BASICs had some sort of EVAL function built in that can evaluate pretty much any expression you care to give it? I know Sinclair BASIC back in '82 (and possible as far back as '80) definitely had one.

I thought a version of the Quick Basic (QB) line had EVAL back in the 90's because I remember that from the one I purchased (for compiling stand alones) or in VB for MS DOS from that time. Apparently it has gone missing in all free BASICs from that line of evolution including Free Basic, QB64 and it's fork and JB. JB doesn't have it nor is it planned for the long awaited JB 2.0 that Carl has recently announced. It is in Liberty Basic and maybe the LB Booster (I think, if Richey is still looking in he might verify.) SmallBASIC has the work around but it's not the same as build-in.

BTW Richard's sweet simple version of EVAL with () posted in a thread called Basic in a Basic at the JB forum has been disappeared quite mysteriously and without explanation along with the entire thread! It disappeared the same day Richard posted so might be part of the on going feud between Richard and Rod (or is Rod acting as Carl's minion?) or, of course, another reason entirely! I wonder how much Carl is aware of Rod' censorship. In whose vision is the forum being molded?

(edits right after post for clarity and information)
3
Code and examples / Re: DJPeter Math Solver in o2
« Last post by John on 19. July 2017, 11:20:23 »
Business BASIC has had EXECUTE("a = 1 + 1") for as long as I can remember. (1980 ->)

Script BASIC executes its dynamic string code in a thread.


4
Code and examples / Re: DJPeter Math Solver in o2
« Last post by ZXDunny on 19. July 2017, 10:57:59 »
I thought that most BASICs had some sort of EVAL function built in that can evaluate pretty much any expression you care to give it? I know Sinclair BASIC back in '82 (and possible as far back as '80) definitely had one.
5
Code and examples / Re: DJPeter Math Solver in o2
« Last post by Aurel on 19. July 2017, 09:26:33 »
Hello boys ..
stop cheating   ;D
One good and simple exaample post Richard Russell ,yes
author of BB4W on his LBBooster forum ,his example must work almost on any basic
and that is what i like  :D
6
Code and examples / Re: DJPeter Math Solver in o2
« Last post by B+ on 17. July 2017, 23:01:37 »
7
Code and examples / Re: DJPeter Math Solver in o2
« Last post by Peter on 17. July 2017, 21:22:28 »
It may sound like cheating, but as a reference, there is a free GNU library which can do this for you: libmatheval

Some BASIC's (and other type of languages) can import its functions using the 'dlopen' API and evaluate any string based expression. Example:

Code: [Select]
IMPORT "evaluator_create(char*)" FROM "libmatheval.so.1" TYPE void*
IMPORT "evaluator_evaluate(void*, int, char**, double*)" FROM "libmatheval.so.1" TYPE double
IMPORT "evaluator_destroy(void*)" FROM "libmatheval.so.1" TYPE void

'------------------------------------------------------------------------

DECLARE f TYPE void*

'------------------------------------------------------------------------

expression$ = "5*(3+1)"                      ' An expression without variables

f = evaluator_create(expression$)

PRINT evaluator_evaluate(f, 0, NULL, NULL)

evaluator_destroy(f)

'------------------------------------------------------------------------

DECLARE var$[] = { "x" }                     ' The expression uses a variable called x

DECLARE nr[] = { 0.1 } TYPE double           ' The variable has value 0.1

expression$ = "6+x*50"                       ' The expression to be calculated

f = evaluator_create(expression$)

PRINT evaluator_evaluate(f, 1, var$, nr)

evaluator_destroy(f)
8
Code and examples / Re: XML Parser
« Last post by John on 10. July 2017, 18:15:21 »
To get back on topic, I feel the Script BASIC SPLITA and LIKE combo makes for a great lightweight XML parsing solution. My next goal is to get this to work with JSON.
9
Code and examples / Re: XML Parser
« Last post by John on 09. July 2017, 23:45:20 »
Maybe not a good analogy but I don't think anyone would be interested in a Btrieve like file system these days.
10
Code and examples / Re: XML Parser
« Last post by ZXDunny on 09. July 2017, 21:53:17 »
On second thought trying to recreate an ISAM keyed file system is like trying to keep Z80 programming alive.

I don't think there's any effort in that at all - z80 programming is very much alive and well on various platforms - both retro and embedded. z80 CPUs are still being manufactured.
Pages: [1] 2 3 ... 10