Haberler:

Forum kuralları güncellendi LÜTFEN  okuyunuz:  https://bit.ly/2IjR3ME

Ana Menü

Variable Problems for Cread

Başlatan buntger, 18 Temmuz 2013, 12:01:10

buntger

Hello,
I'm trying to access memory locations with labels CData for ASCII characters, I am using a graphic display that does not have libraries, and it has no built-in memory characters, for both I and I have to do for now with the method I am using I have not succeeded in compiling it gives me error.    Have if I can help.
What I try to do is when I have to put a word in the display for example "Hello" this word is separated by Letters and each letter H, O, L, A has its ascii code in hexadecimal:
"H"= $7F,$08,$08,$08,$7F,$00
"O"=$3E,$41,$41,$41,$3E,$00

and so on ... then go to the putting them on display in their X and Y coordinates.

When compiling I get an error on Line 10  the variable "InDexMemoria" and not to do or convert.
What I want is to concatenate the variable ("ASCI_") + the number of the Letter Ascii and quedase so "ASCI_72", this works butwhen compiling the variable "InDexMemoria" that goes before CData fails. 

Thanks......

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''   Code
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
00 Dim X as Byte
01 Dim InDexMemoria As String * 8
02 Dim PosMemoria As String * 8
03 Dim Word1 As Word
04 Dim Temp As Byte

05 Word1 = "H"

06 Ini:

07 PosMemoria = "ASCI_" ' Part of the Label for CData
08 InDexMemoria = PosMemoria + Str$(Dec Word1 ) ' Concatenating Label + the number in ascii

' The variable "InDexMemoria = "ASCI_72"

09  For X = 0 To 5   
10    Temp = CRead InDexMemoria + X   '>>>>> At Compile fails me here <<<< for the Variable "InDexMemoria"
11    DelayMS 5000
12  Next X


13 GoTo Ini

14 ASCI_65:
15 CData $7E,$11,$11,$11,$7E,$00      '65 - A
16 ASCI_72:-
17 CData $7F,$08,$08,$08,$7F,$00      '72 - H
18 ASCI_76:-
19 CData $7F,$40,$40,$40,$40,$00      '76 - L
20 ASCI_79:-
21 CData $3E,$41,$41,$41,$3E,$00      '79 - O

''
''
''
''
''
'' ........All  ASCII Code

22 End