Format-Fehler bei Bascom LCD-Ausgabe??

Gast #120792
Lesenswert?

Hallo Bascomanhänger,

kann es sein, daß bei Benutzung von "Format" ein Fehler bei Bascom
vorliegt?
Ich will die Werte eines Zählers von 1-255 auf Display mit führenden
Nullen ausgeben (also: 001-255). Dafür soll in Bascom Format geeignet
sein.
Mein folgendes (Teil-)Programm :

Dim A As Byte
Dim B As String * 3

B = Format(a , "000")
Lcd B
End

zeigt aber folgenden Fehler:

error:242 line:4 Source variable does not match the target variable
(2), in File:.....Noname2.bas

Kann mir da jemand helfen? oder liegt wirklich ein Bug vor



Gruß Helmut
Gast #120793
Lesenswert?

"
target = Format(source, "mask")


Remarks

target  The string that is assigned with the formatted string.
source  The source string that holds the number.
"

Dein Source ist aber kein String, sondern ein byte :)

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren