StrAppendPre Error [Solved]

Beta Testing discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

StrAppendPre Error [Solved]

#1 Post by Dany » 03 Nov 2014 12:13

Problem solved in version 6.5.0. Thanks mE!

Hi, apparently StrAppendPre (mP 6.4) does not work well with an empty string. The function is not left...

Example:

Code: Select all

program TestStrAppendPre;

{ Declarations section }
var Str: string[50];

begin
  { Main program }
  
  Uart1_init(115200);
  delay_ms(100);
  Uart1_write_text('start');
  Uart1_write_text(#13 + #10);
  
  Str := 'abc';                                     // non empty string
  StrAppendPre('\', Str);                       // <--- works well
  uart1_write_text(Str);
  Uart1_write_text(#13 + #10);

  Str := '';                                         // empty string
  StrAppendPre('\', Str);                      // <--- problem, "StrAppendPre" is never left
  uart1_write_text(Str);
  Uart1_write_text(#13 + #10);
end.
Thanks in advance!
Last edited by Dany on 31 Dec 2014 12:19, edited 2 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

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

Re: StrAppendPre Error

#2 Post by filip » 04 Nov 2014 15:39

Hi,

Thank you for reporting this, I will pass it to our developers.

Regards,
Filip.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: StrAppendPre Error

#3 Post by Dany » 31 Dec 2014 12:18

Problem solved in version 6.5.0. Thanks mE!
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Post Reply

Return to “mikroPascal PRO for PIC Beta Testing”