Oxygen Basic
Programming => Bugs & Feature Requests => Topic started by: Frankolinox on April 03, 2013, 07:53:22 AM
-
a) I've downloaded latest oxygen package at the early afternoon. now the "len" command seems to be wrong:
''
'' something is uncorrect with "len" command
''
byte ByteLen
byte p 'AS BYTE 'POINTER
ByteLen = len(p) ' size of a pointer = 4 bytes
print str(bytelen) ' result should be: 4 ' correct! :)
'but oxy says however "0"
b) and I've noticed after checking "AsciEditor" (projectsB/scintilla/) thats an error occured for line 149 and that's concerning "len(iccx)" command too.
best regards, frank
X
-
yes, sorry of course, I am not very fit at the moment (the cold days are trembling my thoughts!), thanks peter, but the problem with "ASciEdit" example still remains, the example worked last days very fine ;)
-
Hi Frank, Just to clarify:
byte b
byte *p
print sizeof b '1
print sizeof p '1
print sizeof sys '4 or 8 all pointers (&p) are sys (32bit or 64 bit)
-
thank you charles for clarification, it's not my day ::)
my little "len()" example:
sys var1,var2
string festerText
wstring zstr
festerText = "TestAlpha" ' 9
zstr = "TestBeta" ' 8
print len(festerText)
print len(zstr)
var1=240
print str(len(var1)) ' 3
'all correct here! ;)
b) in example "AsciEdit.o2bas" I have changed this line from len() into sizeof() and all is working fine here, thank you peter for your tipp!
you must take sizeOf()
iccx.dwSize = sizeof(iccx) 'len(iccx )
so in that example from aurel this line 149 has to be fixed with "sizeof(iccx)" for a next oxygen update issue.
best regards, frank