[fpc-pascal] represent data string in hex?

patspiper patspiper at gmail.com
Sat Sep 21 18:03:08 CEST 2013


On 21/09/13 18:56, wkitty42 at windstream.net wrote:
> On Saturday, September 21, 2013 6:27 AM, patspiper <patspiper at gmail.com> wrote:
>> On 21/09/13 12:15, wkitty42 at windstream.net wrote:
> [trim]
>>> yeah, the singles are bad examples... i'm really wanting the multiple byte
>>> format to work... i tried both and was told "expected string but found byte" or
>>> "word"... it is for a translation table... in quoted-printable, everything is
>>> equalsXX... the same codes are used in utf-8... so i thought if i could just
>>> copy them directly into my array and then change the equals to dollar...
>>>
>>> i ended up getting it to work by wrapping each piece with chr() but that's
>>> really ugly visually when looking at the code to see the side by side character
>>> and replacement tables...
>>>
>>> a[n] := chr($C2)+chr($AD) for two byte codes...
>> What about a[n] := #$C2#$AD?
> i haven't tried that... my understanding is that #xx depicts the decimal format of the character...
>
> eg : $FF == #255
It is rather #$FF which is the same as #255, like Chr(255)

Stephano



More information about the fpc-pascal mailing list