Oxygen Basic

Programming => Problems & Solutions => Topic started by: Frankolinox on September 14, 2013, 01:01:41 AM

Title: ubound function/command?
Post by: Frankolinox on September 14, 2013, 01:01:41 AM
lalala :)
Title: Re: ubound function/command?
Post by: Charles Pegge 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