Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Strings in C - help
13-05-2012, 12:34 AM,
#33
RE: Strings in C - help
(11-05-2012, 08:53 PM)moreno Wrote: Hi

I think this easy routine can solve the problem

Code:
CDCPrintAnyLength (char * Str)

{
int Len = strlen(Str);
int Ctn = 0;
char Buf;
do
  {
   if ( (Ctn + 64) < Len)
    {
     Buf = Str[Ctn+64];
     Str[Ctn+64] = 0;
     CDC.printf("%s",Str+Ctn);
     Str[Ctn+64] = Buf;
    }
   else
    CDC.printf("%s",Str+Ctn);
   Ctn += 64;
  }
while (Ctn < Len);
}

I have not tested it but I think can work without problems.


Bye Bye, Moreno

I have tested this and it works for me.Big Grin

Gone with my crazy way of doing it.

Thanks Moreno!

Dale
PIC32-Pinguino-OTG Rev C and PIC32-PINGUINO-MICRO rev.B
Win XP SP3
r381 x.3 Big Grin
AND spi.c {} error fixed
AND sdmmc.c pin error fixed
AND diskio.c fixed, MICRO can't use the RTCC
AND analog.c fixed for MICRO
Reply


Messages In This Thread
Strings in C - help - by KiloOne - 10-05-2012, 09:24 PM
RE: Strings in C - help - by mf01 - 10-05-2012, 10:00 PM
RE: Strings in C - help - by KiloOne - 10-05-2012, 10:30 PM
RE: Strings in C - help - by KiloOne - 10-05-2012, 10:06 PM
RE: Strings in C - help - by jpmandon - 10-05-2012, 10:18 PM
RE: Strings in C - help - by mf01 - 10-05-2012, 10:43 PM
RE: Strings in C - help - by KiloOne - 10-05-2012, 10:45 PM
RE: Strings in C - help - by jpmandon - 10-05-2012, 11:30 PM
RE: Strings in C - help - by mf01 - 10-05-2012, 11:32 PM
RE: Strings in C - help - by moreno - 11-05-2012, 06:59 AM
RE: Strings in C - help - by mf01 - 11-05-2012, 09:10 AM
RE: Strings in C - help - by KiloOne - 11-05-2012, 01:38 PM
RE: Strings in C - help - by pingotg - 11-05-2012, 02:46 PM
RE: Strings in C - help - by KiloOne - 11-05-2012, 03:08 PM
RE: Strings in C - help - by mf01 - 11-05-2012, 03:08 PM
RE: Strings in C - help - by pingotg - 11-05-2012, 03:27 PM
RE: Strings in C - help - by KiloOne - 11-05-2012, 03:53 PM
RE: Strings in C - help - by pingotg - 11-05-2012, 07:19 PM
RE: Strings in C - help - by mf01 - 11-05-2012, 03:47 PM
RE: Strings in C - help - by mf01 - 11-05-2012, 03:57 PM
RE: Strings in C - help - by KiloOne - 11-05-2012, 04:23 PM
RE: Strings in C - help - by KiloOne - 11-05-2012, 08:33 PM
RE: Strings in C - help - by moreno - 11-05-2012, 08:53 PM
RE: Strings in C - help - by KiloOne - 13-05-2012, 12:34 AM
RE: Strings in C - help - by pingotg - 11-05-2012, 08:58 PM
RE: Strings in C - help - by KiloOne - 11-05-2012, 09:50 PM
RE: Strings in C - help - by pingotg - 12-05-2012, 09:55 AM
RE: Strings in C - help - by moreno - 12-05-2012, 07:45 AM
RE: Strings in C - help - by KiloOne - 12-05-2012, 03:31 PM
RE: Strings in C - help - by pingotg - 12-05-2012, 05:22 PM
RE: Strings in C - help - by KiloOne - 12-05-2012, 05:40 PM
RE: Strings in C - help - by pingotg - 12-05-2012, 06:11 PM
RE: Strings in C - help - by KiloOne - 12-05-2012, 07:27 PM
RE: Strings in C - help - by pingotg - 13-05-2012, 04:48 PM
RE: Strings in C - help - by bjoernp - 15-05-2012, 05:42 PM
RE: Strings in C - help - by KiloOne - 17-05-2012, 12:09 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)