English
Bugs and vermeintliche

bow at &-Operator in Arrays

 

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...)
CompileMarkSeparation
declare 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

10 kB
Hochgeladen:08/02/08
Downloadcounter251
Download
9 kB
Hochgeladen:08/02/08
Downloadcounter248
Download
 
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:
CompileMarkSeparation
declare a%[2]
def mbox(0) messagebox(str$(2 & 2),"",0)
mbox()
messagebox(str$(2 & 2),"",0)
a%[mbox()]=0
a%[messagebox(str$(2 & 2),"",0)]=0
with 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  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.959 Views

Untitledvor 0 min.
Michael W.03/26/16
Sebastian Sprenger03/19/13

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie