Showing array of decimal number string
Archiver
Posts: 46,084
The following statement did not work as expected:
array VAR Byte(8)
i VAR Nib
For i = 0 TO 7
array(i) = i
NEXT
DEBUG "The array is: ", STR DEC array\8, CR
I have array of decimal numbers that I want to show.
Can I show them in a single DEBUG statement using STR and DEC
modifier somehow?
Much thanks in advance.
array VAR Byte(8)
i VAR Nib
For i = 0 TO 7
array(i) = i
NEXT
DEBUG "The array is: ", STR DEC array\8, CR
I have array of decimal numbers that I want to show.
Can I show them in a single DEBUG statement using STR and DEC
modifier somehow?
Much thanks in advance.
Comments
You must display them as:
DEBUG "The array is: "
FOR I = 0 to 7
DEBUG DEC Array(I), 13
NEXT I
When you use the 'STR' modifier, it expects the
Array to hold character code bytes. When you
use the 'DEC' modifier, it displays the
argument as a multi-character decimal string.
The two aren't compatible.
--- In basicstamps@yahoogroups.com, "basicstampede"
<basicstampede@y...> wrote:
> The following statement did not work as expected:
>
> array VAR Byte(8)
> i VAR Nib
>
> For i = 0 TO 7
> array(i) = i
> NEXT
> DEBUG "The array is: ", STR DEC array\8, CR
>
> I have array of decimal numbers that I want to show.
> Can I show them in a single DEBUG statement using STR and DEC
> modifier somehow?
>
> Much thanks in advance.