PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Variablen index (0) ???



Mr-400-Volt
07.07.2008, 12:49
Hallo, ist es in Bascom nicht möglich, eine Variable z.b. von 0 bis 7 zu dimensionieren ??????
Also z.b.

Dim Pwm(7) as Byte

Pwm(0) = 255
Pwm(1) = 255
.
.
.
.
.
.
.

Bluesmash
07.07.2008, 13:00
Hallo!

Auszug aus der Bascom Hilfe:



Arrays

An array is a set of sequentially indexed elements having the same type. Each element of an array has a unique index number that identifies it. Changes made to an element of an array do not affect the other elements.

The index must be a numeric constant, a byte, an integer, word or long.
The maximum number of elements is 65535.
The first element of an array is always one. This means that elements are 1-based.

Arrays can be used on each place where a 'normal' variable is expected.

Das heisst dein PWM Array geht von 1-7

gruss bluesmash

Mr-400-Volt
07.07.2008, 13:04
Schade, von 0-7 wäre einfacher......naja. Danke !!!