BASCOM AVR Doubleword

Hallo,

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

Danke

Thomas

Reply to
Thomas Finke
Loading thread data ...

Thomas Finke schrieb:

Handbuch lesen? In BASCOM heißen Doubles LONG.

- Carsten

--
Audio Visual Systems                          fon: +49 (0)2238 967926
Carsten Kurz                                  fax: +49 (0)2238 967925
 Click to see the full signature
Reply to
Carsten Kurz

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

Reply to
Thomas Finke

Thomas Finke schrieb:

man Modulo

Gruß Henning

--
henning paul home:  http://www.geocities.com/hennichodernich
PM: henningpaul@gmx.de , ICQ: 111044613
Reply to
Henning Paul

öhm???? was sagt mir das nun?
Reply to
Thomas Finke

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

LG aus Wien

Reply to
Rudolf Tomaszovits

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

Reply to
Bernd Schmidt

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.