|
 |
Chris Huff wrote:
>
> In article <3912a80f@news.povray.org>, Warp <war### [at] tag povray org>
> wrote:
>
> > How about adding support for variables, conditionals (if) and loops
> > (while) to functions (used in isosurfaces, pigments...)?
> > This would enhance a lot the possibilities of the functions. It would
> > allow, for example, making a Mandelbrot pattern function.
>
> There is already an if() "statement", it is a function. As I remember,
> the syntax is like this: if(CONDITION, IF_VAL, ELSE_VAL)
> Support for variables and other flow control would be very useful, but I
> suspect it would require rewriting a large portion of the function code.
> I don't understand much of it though, I could be wrong.
Oh, well... You could probably do a Basic interpreter(not gwbasic...
QBasic would be good...)... It's got fast results, is turing complete,
not hard to learn, and isn't too hard to interpret, if you drop all
unneeded functions...
Or, you could also allow system calls... (function(system("/[whatever]",
x))
Both would work, but a basic interpreter is completely portable...
--
AKA paul_virak_khuong at yahoo.com, pkhuong at deja.com, pkhuong at
crosswinds.net and pkhuong at technologist.com(list not complete)...
Post a reply to this message
|
 |