Again the same question : initialize a string with non-printable characters ...

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

Again the same question : initialize a string with non-printable characters ...

#1 Post by lemiceterrieux » 10 Apr 2022 08:02

I must Initialize a string variable. Normally one uses StringVariable := '012345' ; but the variable must be sent as a control string to a peripheral via UART, and must include non-printable characters (ASCII code < $20) ; will I need to initialize the string one element at a time, i.e. StringVariable [..] := chr (..), or is there another better method ? Thanks for any answer ...
From France, SESSENHEIM

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Again the same question : initialize a string with non-printable characters ...

#2 Post by filip » 14 Apr 2022 13:08

Hi,

Yes, you could initialize string elements one by one.

Regards,
Filip.

Post Reply

Return to “mikroPascal PRO for AVR General”