It was a very subtle joke by port, read again
i don't get it :(
You asked what that function did, Port said "It displays a syntax error report" because your function did not have the word function before it.
Code: [Select]sC(%a,%b,%c){ if(%b==%c) return %a; %d = %b; %e = %c; %b = Min(%d, %e); %c = Max(%d, %e); %f = getSubStr(%a, %b, 1); %g = getSubStr(%a, %c, 1); if(%b > 0) %i = getSubStr(%a, 0, %b); else %i = ""; if(%b+1 != %c) %j = getSubStr(%a, %b+1, (%c - %b) - 1); else %j = ""; if(%c < strLen(%a) - 1) %h = getSubStr(%a, %c+1, strLen(%a)); else %h = ""; return %i @ %g @ %j @ %f @ %h;}
sC(%a,%b,%c){ if(%b==%c) return %a; %d = %b; %e = %c; %b = Min(%d, %e); %c = Max(%d, %e); %f = getSubStr(%a, %b, 1); %g = getSubStr(%a, %c, 1); if(%b > 0) %i = getSubStr(%a, 0, %b); else %i = ""; if(%b+1 != %c) %j = getSubStr(%a, %b+1, (%c - %b) - 1); else %j = ""; if(%c < strLen(%a) - 1) %h = getSubStr(%a, %c+1, strLen(%a)); else %h = ""; return %i @ %g @ %j @ %f @ %h;}
This does nothing of any use, at least out of context. It appears to chop up "A" and rearrange the numbers. sC(1234, 2, 4) -> 1243.
try sC("abcd", 0, 3);
It's too long for console and I'm too lazy to paste it into a file. Is there a point you're trying to make with this?
Try it and see for yourself, it actually does do something.
The result is the letters a b c d randomly combined.Ok.Um... what
It's "dbca" isn't it?Think carefully about how the letters are ordered, and what you inputted to the function.
Oh, I loving understand. Holy stuff. How did I miss that? sC -> switchCharacters. I feel like a handicap.
._.ok whats the use for us?