Author Topic: ubound and lbound don't work if the array shares its name with a constant  (Read 45 times)

mcalkins

  • Hero Member
  • *****
  • Posts: 1268
    • qbasicmichael.com
    • Email
Code: [Select]
CONST v = 5
REDIM v(15)
PRINT UBOUND(v)
PRINT v

prints:

 15
 5

in QBASIC 1.1.

I get "Expected operator in equation" in QB64 0.954. I don't know if this affects GL also.

Same for DIM instead of REDIM.

Regards,
Michael

P.S. Assigning to and reading an element of the array works. It just seems that ubound and lbound don't work.
« Last Edit: April 26, 2013, 11:44:51 PM by mcalkins »
The QBASIC Forum Community: http://www.network54.com/index/10167 Includes off-topic subforums.
QB64 Off-topic subforum: http://qb64offtopic.freeforums.org/