PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Max variables in a program  (Read 570 times)

ChrisKCAi

  • Silver Member
  • ***
  • Posts: 38
    • View Profile
Max variables in a program
« on: November 10, 2022, 09:33:27 AM »
I'm getting an error 19 trying add some code into a program but I know it doesn't exceed max program size - I have a vague recollection that there is also a max # of discrete variables that be referenced within a single program - is that correct? I didn't see anything in the "system limits" section of the doc.

Loren Doornek

  • Gold Member
  • ****
  • Posts: 85
    • View Profile
Re: Max variables in a program
« Reply #1 on: November 10, 2022, 10:07:29 AM »
There's a limit of 32000 bytes to the variable space.  Refer to this thread:  https://forum1.pvxplus.com/index.php?topic=887.msg2983#msg2983

Here's how I check it:

LOAD “My_Program”
OPEN INPUT (UNT,ISZ=-1)PGN; READ RECORD (LFO,SIZ=256)r$; CLOSE (LFO); PRINT DEC(MID(r$,101,4))-DEC(MID(r$,105,4))

ChrisKCAi

  • Silver Member
  • ***
  • Posts: 38
    • View Profile
Re: Max variables in a program
« Reply #2 on: November 10, 2022, 10:22:15 AM »
Loren,

Well, that's why I had a "vague" memory - thanks!