array of chat to string

General discussion on mikroPascal PRO for AVR.
Post Reply
Author
Message
corado
Posts: 399
Joined: 28 Mar 2009 11:03

array of chat to string

#1 Post by corado » 26 Sep 2022 13:53

Hallo,
I have an array of char
sign : array [0..3] OF CHAR;

And will give it out on LCD one part after another for rotating - / - \

LCD_OUT(1,16,sign[0]);


But this till make a failure because simple and complex Type:-(

Ho can I give out a part of an array of char?

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

Re: array of chat to string

#2 Post by filip » 10 Oct 2022 15:28

Hi,

I'm not sure that I understand you correctly, can you please clarify your question ?

Regards,
Filip.

corado
Posts: 399
Joined: 28 Mar 2009 11:03

Re: array of chat to string

#3 Post by corado » 10 Oct 2022 19:43

I want to display these characters one after the other on the display, as a status check, as if it is turning - / - - \.

greg.b
Posts: 11
Joined: 21 Sep 2017 21:37

Re: array of chat to string

#4 Post by greg.b » 18 Oct 2022 20:36

LCD_OUT(1,16,''+sign[0]);

corado
Posts: 399
Joined: 28 Mar 2009 11:03

Re: array of chat to string

#5 Post by corado » 18 Oct 2022 20:56

I think my mistake was that I use VAR and not const....

serg1980
Posts: 44
Joined: 19 Mar 2014 05:58

Re: array of chat to string

#6 Post by serg1980 » 16 Feb 2023 08:48

Code: Select all

LCD_Chr(1,16,sign[0]);
LCD_OUT(1,10,sign);       

corado
Posts: 399
Joined: 28 Mar 2009 11:03

Re: array of chat to string

#7 Post by corado » 02 Mar 2023 09:16

@serg1980
My goal is to give out
LCD_Chr(1,16,sign[0]);
then
LCD_Chr(1,16,sign[1]);
then
LCD_Chr(1,16,sign[2]);
then
LCD_Chr(1,16,sign[3]);
and repeat this

greg.b
Posts: 11
Joined: 21 Sep 2017 21:37

Re: array of chat to string

#8 Post by greg.b » 02 Apr 2023 18:16

Did you check it this way
LCD_OUT(1,16,''+sign[0]);
LCD_OUT(1,16,''+sign[1]);
LCD_OUT(1,16,''+sign[2]);
LCD_OUT(1,16,''+sign[3]);
use ' '+
it works.

Post Reply

Return to “mikroPascal PRO for AVR General”