No. That would require a source level interpreter which doesn't exist for spin.
Have a look at FemtoBasic (http://forums.parallax.com/showthread.php?p=624225)
for an example of a source level interpreter that runs on the Propeller. The source can be modified to use
floating point rather than integer arithmetic and you could throw out everything except the expression
parser if you only need that. This interpreter compresses keywords. If you're just handling expressions,
you don't really need that either.
PUB something (function)
(somehow run the function dothis(hi))
See what I'm saying? What that would do would dothis would be run and it's results passed on the something (function). I want the command to do the function to be passed down to something (function)
Phipi had some examples of using function pointers, using callbacks for printing out a stream of bytes if I'm not mistaken. Try to search his posts.
Eval (if it works like Lisp's eval) seems to be a strange way of passing a function as an argument, but I don't know php so I can't say anymore.
Comments
Have a look at FemtoBasic (http://forums.parallax.com/showthread.php?p=624225)
for an example of a source level interpreter that runs on the Propeller. The source can be modified to use
floating point rather than integer arithmetic and you could throw out everything except the expression
parser if you only need that. This interpreter compresses keywords. If you're just handling expressions,
you don't really need that either.
something(dothis(hi));
PUB something (function)
(somehow run the function dothis(hi))
See what I'm saying? What that would do would dothis would be run and it's results passed on the something (function). I want the command to do the function to be passed down to something (function)
It is possible to do function pointers, but it's painful and convoluted. Chances are there's an easier way of doing what
you intend.
Eval (if it works like Lisp's eval) seems to be a strange way of passing a function as an argument, but I don't know php so I can't say anymore.