Oxygen Basic
Programming => Problems & Solutions => Topic started by: Peter on April 08, 2015, 10:43:52 AM
Title:
Len Function
Post by:
Peter
on
April 08, 2015, 10:43:52 AM
Deleted
Title:
Re: Len Function
Post by:
Charles Pegge
on
April 08, 2015, 12:32:11 PM
Peter,
countof
cars will give you the static array count.
len cars is the same as len cars[0]
Code: OxygenBasic
include
"
asm
.inc"
window 640,480,1
string
cars = {"BMW","VOLVO","SAAB","FORD","OPEL","RENAULT","MERCEDES"}
for
i=0
to
<
countof
cars
text 10,i*12,10,cars[i]
next
for
i=0
to
6
text 90,i*12,10,cars[i]
next
waitkey
winExit
Title:
Re: Len Function
Post by:
Aurel
on
April 08, 2015, 02:55:09 PM
Quote
countof was not known to me until now!
yes for me to.. ???
Title:
Re: Len Function
Post by:
Charles Pegge
on
April 08, 2015, 07:49:43 PM
There are a few more
of
s, mostly used for diagnostics, returning numbers or strings.
Here is the current list:
sizeof
offsetof
countof / spanof
bytesof
typecodeof
typeof
structureof / encodingof
prototypeof
recordof
PS:
plasma.exe works on my PC