Initializing a string

General discussion on mikroPascal PRO for AVR.
Post Reply
Author
Message
lemiceterrieux
Posts: 39
Joined: 12 Nov 2020 19:51

Initializing a string

#1 Post by lemiceterrieux » 27 Jan 2022 12:42

Hello again. I wanna send a command string (in which only one element varies) via UART1_Write_Text to a peripheral : the ASCII codes of the characters are $AA $03 $03 (Byte variable, initially set to any value) $0A ; how can I initialize the "fixed" elements with these most non-printable characters ? Must I affect the values individually to each element of the string via chr (..), or is there another way to do this (as with printable characters, which can simply be put between "apostrophes", i.e. "single quotes", a string literal which can be transferred to the string) ? I looked at "string literals" in the help section, but found nothing about including characters via their ASCII code, so I'm afraid it's not possible ... Thanks for any answer !
From France, SESSENHEIM

Post Reply

Return to “mikroPascal PRO for AVR General”