![]() |
[CODE]RLE(string)={
my(number=1,string=eval(Vec(Str(string))),Letter=string[1]); for(x=2,#string, if(string[x]==Letter, number+=1, print1("("number")"Letter); Letter=string[x]; number=1) );print1("("number")"Letter) }[/CODE] so it now becomes this and should work. [QUOTE](1)m(1)i(2)s(1)i(2)s(1)i(2)p(1)i[/QUOTE] |
[QUOTE=science_man_88;239381]copying your format I found another missed semi colon[/QUOTE]
no the semi coon is the only thing I think lol. |
[QUOTE=science_man_88;239384][CODE]RLE(string)={
my(number=1,string=eval(Vec(Str(string))),Letter=string[1]); for(x=2,#string, if(string[x]==Letter, number+=1, print1("("number")"Letter); Letter=string[x]; number=1) );print1("("number")"Letter) }[/CODE] so it now becomes this and should work.[/QUOTE] now I need a decoding part this semi falls under finding if a string is numerical, I'll start to try to decode it again. |
[url]http://rosettacode.org/wiki/Substring[/url]
too hard ? wasn't this done on this forum for FaR lol |
[QUOTE=science_man_88;239343]I added my() in just to satisfy you even though i see no point of it.[/QUOTE]
I thought you'd like this (maybe it'll make you feel better?) -- see #4: [url]http://www.techradar.com/news/software/applications/10-mistakes-every-programmer-makes-909424[/url] |
[QUOTE=CRGreathouse;239468]I thought you'd like this (maybe it'll make you feel better?) -- see #4:
[url]http://www.techradar.com/news/software/applications/10-mistakes-every-programmer-makes-909424[/url][/QUOTE] how does my help that ? nevermind I see what you mean lol. |
Suppressing exceptions:
never played with try and catch so never caught an error in my code to suppress lol. |
Storing secrets in plain text
good luck i don't even make addhelp for most of my programs in Pari lol, I'm not necessarily going to leave something as a comment lol. |
Not being up to date:
probably my second worst one. my number 1 might be #1 lol |
[QUOTE=science_man_88;239474]Suppressing exceptions:
never played with try and catch so never caught an error in my code to suppress lol.[/QUOTE] Yes, by doing nothing you have actually been doing it the right way. :smile: Having said that, trap() is occasionally useful. |
[QUOTE=CRGreathouse;239477]Yes, by doing nothing you have actually been doing it the right way. :smile:
Having said that, trap() is occasionally useful.[/QUOTE] Yeah same with comment(s) like they say [COLOR="Red"]no passwords in plain text[/COLOR] you may get lost trying to read uncommented code, But some random other person could have just as hard of a time until they figure it out. |
| All times are UTC. The time now is 23:10. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.