E-Basic problems
David McFarlane
mcfarla9 at msu.edu
Fri Feb 20 16:03:42 UTC 2009
Following up after an off-list exchange with Amy...
>I was looking at the random number generator, the Random
>(function). It was getting an error at the Sub Main()
Aha, that's it. Most likely you innocently pasted that entire
example script into an inline script object. That will not work at
all, as you cannot define a Sub in inline script (since that is
already executing from withing a Sub), you must define Subs and
Functions in the global User Area, as described in the Using E-Basic
chapter of the User's Guide.
Furthermore, that example is really meant for version 1.x. Back in
version 1.x you could edit the raw source code as text directly in
E-Run; version 2 took that away from us. Anyway, you would open a
blank E-Run window, then copy and paste the complete Random() example
into E-Run, and run that. Just to make sure, I tried this myself
and... what do you know, the Random() example has an error in
it! They forgot to define their variables, you need to add a "Dim x,
y, message" or the like in there, then it works. Bad E-Prime example
writers! They really need to proofread and test what they write
before foisting it off on innocent users! I will report this error
to PST in case they want to fix it in future documentation.
-- David McFarlane, Professional Faultfinder
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---
More information about the Eprime
mailing list