|Date: ||Fri, 7 Oct 2005 19:46:55 -0400|
|Reply-To: ||Raynald Levesque <email@example.com>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||Raynald Levesque <firstname.lastname@example.org>|
|Subject: ||Re: script help: "sub main undefined" error|
|Content-type: ||text/plain; charset=iso-8859-1|
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:
'do something here
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
Raynald Levesque Raynald@spsstools.net
Visit my SPSS site: http://www.spsstools.net
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of
Chris A. McGibbon
Sent: October 7, 2005 8:00 AM
Subject: script help: "sub main undefined" error
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
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,