Author Topic: ubound function/command?  (Read 1677 times)

0 Members and 1 Guest are viewing this topic.

Frankolinox

  • Guest
ubound function/command?
« on: September 14, 2013, 01:01:41 AM »
lalala :)
« Last Edit: October 01, 2014, 08:48:50 AM by Frankolinox »

Charles Pegge

  • Guest
Re: ubound function/command?
« Reply #1 on: September 14, 2013, 03:17:41 AM »
You can use spanof to get the number of elements in a static array. This is the same as UBOUND when the indexbase is 1.

sys aa[100]
print spanof aa 'result 100

...

for j=1 to spanof aa
  aa[j]=j
next

...

IF spanof(g_TabFilePaths) => TabIdx THEN
  szCaption = g_TabFilePaths(TabIdx) ' & " | " & "Tab #" & format$(TabIdx)
END IF