HP OpenVMS Systems

ask the wizard
Content starts here

Illegal line number error? (BASIC)

» close window

The Question is:

Using BASIC programming language:
Why do I get an ?Illegal number LINE:  22654 error on the following command?
X% = 7
WRK.AMT(X%) = 0.0000
22654  IF WRK.AMT(X%) = 0 THEN
          WRK.AMT(X%) = 0
       END IF
The error does not occur on a VAX system.

The Answer is :

  No error was encounted using DEC BASIC V1.3-000 running on an
  OpenVMS Alpha V7.2-1 system, though only after the addition of
  the required initial line number for the BASIC program (line 1,
  in this case) -- all OpenVMS BASIC programs require an initial
  line number.
              1 1
              2 X% = 7
              3 WRK.AMT(X%) = 0.0000
              5 22654  IF WRK.AMT(X%) = 0 THEN
              6           WRK.AMT(X%) = 0
              7        END IF
  Information on the BASIC compiler version and program environment
  will be of interest.  Please contact the Compaq Customer Support
  Center directly for assistance in resolving this problem.

answer written or last revised on ( 19-JUL-2000 )

» close window