Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 Word into Bytes.. why does this not work?? Kategorie: C-Control I V1.2/2.0 (von Windt H.J. - 17.05.2008 18:35)
Hello,
Why does the following program not work??

define x word[1]
put 0
#start
x = -1
print x
print x / 256
print x mod 255
#end_loop
goto end_loop

And this one does work...

define x word[1]
put 0
#start
x = -1
print x
print (x and &hff00) shr 8
print (x and &h00ff)
#end_loop
goto end_loop

Greetings,
H.J. Windt

 Antwort schreiben

Bisherige Antworten:

Re: Word into Bytes.. why does this not work?? (von Achim - 17.05.2008 18:51)
    Re: Word into Bytes.. why does this not work?? (von Windt H.J. - 17.05.2008 19:31)
        Re: Word into Bytes.. why does this not work?? (von Achim - 17.05.2008 21:23)