BASCOM AVR Doubleword

T

Thomas Finke

Guest
Hallo,

kann mir jemand sagen wie ich in BASCOM AVR ne Variable als Double (also 32
Bit) deklariere?

Danke

Thomas
 
Thomas Finke schrieb:
Hallo,

kann mir jemand sagen wie ich in BASCOM AVR ne Variable als Double (also 32
Bit) deklariere?
Handbuch lesen? In BASCOM heißen Doubles LONG.

- Carsten

--
Audio Visual Systems fon: +49 (0)2238 967926
Carsten Kurz fax: +49 (0)2238 967925
Fasanenweg 38a email: audiovisual@t-online.de
50259 Pulheim / Germany WGS84:N50°58'44.7" E06°47'03.5"
 
Noch ne andere kleine Frage.....wenn ich ne Variable als Word oder Long
habe...wie bekomme ich die niederwertigsten 8 Bit dann in eine eigene
Byte-Variable?

Thomas
 
Thomas Finke schrieb:

Noch ne andere kleine Frage.....wenn ich ne Variable als Word oder Long
habe...wie bekomme ich die niederwertigsten 8 Bit dann in eine eigene
Byte-Variable?
man Modulo

Gruß
Henning
--
henning paul home: http://www.geocities.com/hennichodernich
PM: henningpaul@gmx.de , ICQ: 111044613
 
"Thomas Finke" <finke.thomas@gmx.de> wrote in message news:<3f5c67fa$0$2341$9b4e6d93@newsread2.arcor-online.net>...
Noch ne andere kleine Frage.....wenn ich ne Variable als Word oder Long
habe...wie bekomme ich die niederwertigsten 8 Bit dann in eine eigene
Byte-Variable?

Thomas
Lege auf die Variable einen Pointer und lese mit PTR+0 und PTR+1 die MSB LSB aus.

LG aus Wien
 
On Mon, 8 Sep 2003 13:28:19 +0200, "Thomas Finke"
<finke.thomas@gmx.de> wrote:

Noch ne andere kleine Frage.....wenn ich ne Variable als Word oder Long
habe...wie bekomme ich die niederwertigsten 8 Bit dann in eine eigene
Byte-Variable?

Thomas

dim b as byte
dim l as long
l = &H12345678
b = l
print hex(b) ' wird $78 anzeigen

Steht auch iin der Hilfedatei.
If you try to store the result of a LONG into a byte, only the LSB of
the LONG will be stored into the BYTE.
Byte = LONG
When LONG = 256 , it will not fit into a BYTE. The result will be 256
AND 255 = 0.
<


Gruss Bernd
 

Welcome to EDABoard.com

Sponsor

Back
Top