Citiram: |
Data Types
Every variable in BASCOM has a data type that determines what can be stored in the variable. The next section summarizes the elementary data types. Elementary Data Types Bit (1/8 byte). A bit can hold only the value 0 or 1. A group of 8 bits is called a byte. Byte (1 byte). Bytes are stores as unsigned 8-bit binary numbers ranging in value from 0 to 255. Integer (two bytes). Integers are stored as signed sixteen-bit binary numbers ranging in value from -32,768 to +32,767. Word (two bytes). Words are stored as unsigned sixteen-bit binary numbers ranging in value from 0 to 65535. Long (four bytes). Longs are stored as signed 32-bit binary numbers ranging in value from -2147483648 to 2147483647. Single. Singles are stored as signed 32 bit binary numbers. Ranging in value from 1.5 x 10^–45 to 3.4 x 10^38 Double. Doubles are stored as signed 64 bit binary numbers. Ranging in value from 5.0 x 10^–324 to 1.7 x 10^308 String (up to 254 bytes). Strings are stored as bytes and are terminated with a 0-byte. A string dimensioned with a length of 10 bytes will occupy 11 bytes. |
vilko je napisal/a: |
Odgovor na zadnje vprašanje je 1024 |
rene_9 je napisal/a: |
Error:7 Line:67 IF THEN expectet[67]
Error:269 Line:67 END SELECT expectet Program ja je sledeč: $regfile = "m8515.dat" $crystal = 12000000 Config Debounce = 40 Dim Stevec As Byte Config Porta = Input Config Portb = Output Tipka1 Alias Pina.0 Led1 Alias Portb.0 Led2 Alias Portb.1 Zacetek: Do Debounce Tipka1 , 0 , Vklop Loop Vklop: Incr Stevec If Stevec = 3 Then Stevec = 0 End If Goto Izbira ' tega ni treba Izbira: Select Case Stevec Case 0 : Goto Prog1 Case 1 : Goto Prog2 Case 2 : Goto Prog3 Prog1: Set Led1 Goto Zacetek Prog2: Reset Led1 Wait 1 Set Led1 Wait 1 Set Led2 Goto Zacetek Prog3: Set Led2 Wait 1 Set Led1 Wait 1 Goto Zacetek |
Koda: |
Each device has a unique 64-bit serial code stored in an onboard ROM |