| |
|
|
Sebastian Sprenger | If one one aray a new worth zuweist and inside the eckigen bracket binäres and (&-Operator) standing, becomes this as logisches and interprets (d.h. it'll only in element 0 or 1 written). the exit against only in the Runtime on, not but in the Interpreter.
(Getestet under XProfan 9 and OGLBasic 1.0. i don't know, whether the Error already famous is or in XProfan 11 too yet appears...) CompileMarkSeparationdeclare a%[3]
a%[0]=16
a%[1]=17
a%[2]=18
a%[3]=19
cls
print "2 & 2 ->",2 & 2
print
print "a%[2 & 2] = ",2 & 2
Diese Zeile sollte eigentlich in a%[2] schreiben,
schreibt in der Runtime aber tatsächlich in a%[1]:
a%[2 & 2]=2 & 2
print
print "a%[0] ->",a%[0]
print "a%[1] ->",a%[1]
print "a%[2] ->",a%[2]
print "a%[3] ->",a%[3]
print
Das Lesen funktioniert hingegen immer richtig:
print "a%[2 & 2] ->",a%[2 & 2]
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32 Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM Windows Me, 1.8 Ghz, 256 MB RAM | 08/02/08 ▲ | |
|
|
|
|
Jörg Sellmeyer | the comes by me out:
OK - i was vorschnell. in the Compilations too wrong |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 08/02/08 ▲ |
|
|
|
|
RGH | OK, I know of course not yet Why it's located, but I white a Workaround: clinging!
a%[(2 & 2)] = 2 & 2
functions interprets and compiled, so as looks was this seltsame behaviour well since the introduction the Arrays and Operators already so. there it now first auffiel. shining these structure (binäre Operators in the Arrayindex with the Zuweisung) well sooner seldom vorkommen.
i hope so in the next Version To to fix.
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 08/03/08 ▲ |
|
|
|
|
Michael Dell | wants you not frighten Roland but the functions neither.
remaining only the detour over ne Variable.
var zw% = 2 & 2 a%[zw%] = 2 & 2 |
|
|
| Salu Michael...
Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! | 08/03/08 ▲ |
|
|
|
|
Sebastian Sprenger | RGH
since the introduction the Arrays and Operators already so. not integrally, in Profan² 7.0e runs everything correctly. Michael Dell
remaining only the detour over ne Variable ...or over The @And-function (with or without PROFALT.INC). I faith too, it comes really only the &-characters directly inside the on. here one gefälliges example: CompileMarkSeparationwith whom first three MessageBoxes comes by me 2, and with the last 1. Greeting, Sebastian |
|
|
| Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32 Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM Windows Me, 1.8 Ghz, 256 MB RAM | 08/03/08 ▲ |
|
|
|
|
RGH | Hi, too this bow becomes in XProfan 11.1 fixed his!
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 11/11/08 ▲ |
|
|
|