| Date: | Fri, 7 Oct 2005 19:46:55 -0400 |
| Reply-To: | Raynald Levesque <rlevesque@videotron.ca> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | Raynald Levesque <rlevesque@videotron.ca> |
| Subject: | Re: script help: "sub main undefined" error |
| In-Reply-To: | <000801c5cb36$ae472da0$6500a8c0@r00cam41> |
| Content-type: | text/plain; charset=iso-8859-1 |
Hi
1. First possible explanation
A stand alone script needs to be called "Sub Main".
If it is called something else, for instance "Sub yourScript()"
then it has to be called by another script like this:
Sub Main()
call yourScript
End sub
Sub yourScript()
'do something here
End Sub
In the above example, removing the Sub Main from the SBS file generates the
error message you mention.
2. Second possible explanation
If you DO have a "Sub Main" in the SBS file then try replacing "Sub Main" by
"Sub Main()"
HTH
Raynald Levesque Raynald@spsstools.net
Visit my SPSS site: http://www.spsstools.net
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of
Chris A. McGibbon
Sent: October 7, 2005 8:00 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: script help: "sub main undefined" error
Dear list,
I wrote an SPSS script for a client. It works perfectly on my machines (PIII
Win98se SPSS v10 and P4 WinXP SPSS v11.5), but on his machine (P4 WinXP SPSS
v12) he gets a "sub main undefined" error.
Other scripts I have written for him work fine on his machine (so I don't
think it's a version issue...).
I am still learning Sax Basic... so I wonder if someone can help me answer
these questions:
1. The error report "sub main undefined" seems like a very basic compiler
error. What sort of errors in the code lead to this?
2. Could there be machine (or Sax Basic version - I use 4.10 and his has
5.01) related differences that could be causing this?
I'm very puzzled by this error... but don't know what to look for.
Thanks in advance,
Chris
|