Fwd: Re: Wishes: hex-output

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Re: Wishes: hex-output

Jakob Praher
I was only refering to:

>ucase([C|Cs]) when C>=$a,C=<$z -> [C-32|ucase(Cs)];

/Jakob

>At 11:10 2001-02-06 +0100, you wrote:
>Jakob Cederlund =?iso-8859-1?Q?p=E5?= UAB <jakob> writes:
> >What about ????? etc?
> >Would be better to go to the functions in the OS instead.
>
>How do you mean?  The i/o libraries are Latin-1 "aware" and print all
>printable characters.  It is also permitted to use the letters from the
>"upper half" in atom and variable names without quoting. (Of course you
>can't quote variables)
>
>         Robert



Reply | Threaded
Open this post in threaded view
|

Fwd: Re: Wishes: hex-output

Robert Virding-4
Jakob Cederlund =?iso-8859-1?Q?p=E5?= UAB <jakob> writes:
>I was only refering to:
>
>>ucase([C|Cs]) when C>=$a,C=<$z -> [C-32|ucase(Cs)];

OK, that would have to be coded something like:

ucase([C|Cs]) when C >= $a, C =< $z -> [C - ($a-$A)|ucase(Cs)];
ucase([C|Cs]) when C >= $?, C =< $?, C /= $? ->
    [C - ($? -$?)|ucase(Cs)];

>>At 11:10 2001-02-06 +0100, you wrote:
>>Jakob Cederlund =?iso-8859-1?Q?p=E5?= UAB <jakob> writes:
>> >What about ????? etc?
>> >Would be better to go to the functions in the OS instead.
>>
>>How do you mean?  The i/o libraries are Latin-1 "aware" and print all
>>printable characters.  It is also permitted to use the letters from the
>>"upper half" in atom and variable names without quoting. (Of course you
>>can't quote variables)
>>
>>         Robert
>




Reply | Threaded
Open this post in threaded view
|

Fwd: Re: Wishes: hex-output

Robert Virding-4
Robert Virding <rv> writes:
>OK, that would have to be coded something like:
>
>ucase([C|Cs]) when C >= $a, C =< $z -> [C - ($a-$A)|ucase(Cs)];
>ucase([C|Cs]) when C >= $?, C =< $?, C /= $? ->
>    [C - ($? -$?)|ucase(Cs)];

Whoops, that should be:

ucase([C|Cs]) when C >= $a, C =< $z -> [C - ($a-$A)|ucase(Cs)];
ucase([C|Cs]) when C >= $?, C =< $?, C /= $? ->
    [C - ($? -$?)|ucase(Cs)];

Note that the compiler will optimize the ($a-$A) and ($? -$?)
expressions, but it can't handle the eqivalent C + $A -$a.

        Robert