- Subject: rot13 v2.0
- From: Joerg Sommer <joerg@xxxxxxxxxxxx>
- Date: Thu, 2 Dec 2004 10:23:56 +0000 (UTC)
Hi,
I compiled the new slang 2.0 and jed. All works fine. Great job, John.
I found rot13() and I tried the new syntax for _for. Here is the new
version:
#v+
%%
%% rot13.sl---- rotates text by 13 characters
%%
define rot13 ()
{
check_region (1); % spot pushed
variable a = String_Type[256], i;
_for i ('A', 'M', 1)
{
a[i] = char (i + 13);
% Now take care of lower case ones
i |= 0x20;
a[i] = char (i + 13);
}
_for i ('N', 'Z', 1)
{
a[i] = char (i - 13);
% Now take care of lower case ones
i |= 0x20;
a[i] = char (i - 13);
}
translate_region (a);
pop_spot ();
}
#v-
--
Diskutiere nie mit einem Idioten:
Sie ziehen Dich auf ihr Niveau herab und schlagen Dich dann mit
Erfahrung.
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2004 date index]
[2004 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]