06-18-2010, 02:53 PM
I've just realized RND() is not accepted ("Unexpected token '(' <LP>"), but only RND. I know it doesn't have parameters in Sinclair BASIC, but it's a function anyway. In fact, both INKEY and INKEY() are accepted, and the case is analogous.
I took a look at the functions list of the original ZX Spectrum manual (page 198, Spanish edition), and realized that PI is there! I never thougth it was a function, but a constant. Well, I tried PI() in ZX BASIC and it's not accepted, not a surprise.
It's clear PI is a constant (that's the description in the wiki), but what's the difference between RND and INKEY? They both are functions that need no parameter. I think RND() should be accepted, if only for syntax coherence.
(I've just read the FreeBASIC's RND syntax. It's accepted without brackets, but can have an optional parameter, the seed.)
I took a look at the functions list of the original ZX Spectrum manual (page 198, Spanish edition), and realized that PI is there! I never thougth it was a function, but a constant. Well, I tried PI() in ZX BASIC and it's not accepted, not a surprise.
It's clear PI is a constant (that's the description in the wiki), but what's the difference between RND and INKEY? They both are functions that need no parameter. I think RND() should be accepted, if only for syntax coherence.
(I've just read the FreeBASIC's RND syntax. It's accepted without brackets, but can have an optional parameter, the seed.)
Marcos Cruz
http://programandala.net
http://programandala.net