BASCOM AVR Doubleword

Sep 07, 2003 6 Replies

Hallo,



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



Danke



Thomas


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 Fasanenweg 38a email: snipped-for-privacy@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:

man Modulo

Gruß Henning

henning paul home: http://www.geocities.com/hennichodernich PM: henningpaul@gmx.de , ICQ: 111044613

öhm???? was sagt mir das nun?

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

LG aus Wien

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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required