Hallo,
kann mir jemand sagen wie ich in BASCOM AVR ne Variable als Double (also 32 Bit) deklariere?
Danke
Thomas
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
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
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.