String as an argument of procedure

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

String as an argument of procedure

#1 Post by lemiceterrieux » 17 Feb 2021 08:37

How can I declare a string of variable length in the "procedure" line ? I noted that if I declare :
Procedure Test (Var Line : String [10]);
and if I call it with a string of less than 10 chars, a compilation warning is sometimes (especially if I use a string variable assigned with less than 10 chars) generated.
From France, SESSENHEIM

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

Re: String as an argument of procedure

#2 Post by filip » 17 Feb 2021 12:16

Hi,

Try this :

Code: Select all

Procedure Test (Var Line : String);
Regards,
Filip.

lemiceterrieux
Posts: 39
Joined: 12 Nov 2020 19:51

Re: String as an argument of procedure

#3 Post by lemiceterrieux » 17 Feb 2021 13:00

Thanks, it works ...
From France, SESSENHEIM

Post Reply

Return to “mikroPascal PRO for AVR General”