[fpc-pascal] represent data string in hex?

wkitty42 at windstream.net wkitty42 at windstream.net
Sun Sep 22 22:45:29 CEST 2013


On Sunday, September 22, 2013 1:25 PM, Sven Barth <pascaldragon at googlemail.com> wrote: 
> On 12209201313:38, wkitty42 at windstream.net wrote: 
> > 
> > On Saturday, September 21, 2013 12:03 PM, patspiper <patspiper at gmail.com> 
> wrote: 
> >> On 21/09/13 18:56, wkitty42 at windstream.net wrote: 
> > [...] 
> >>> 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) 
> > 
> > this worked, pat... thanks for the pointer! 
> > 
> > but i'm still confused as to what # means to indicate... i've always 
> understood it to indicate the decimal value of a raw byte whereas $ indicates 
> the hex value of a raw byte... i haven't found anything showing the use of #$xxx 
> though :/ 
>  
> '#' indicates a character. This is followed by either a decimal or 
> hexadecimal ('$') value (maybe - in FPC - binary ('%') and octal ('&') 
> values are possible as well). 

ahhh! ok... that makes sense... i had read about FPC being able to use binary and octal as well but only in certain modes... TP and Delphi modes don't allow them IIRC... anyway, i've been in TP/BP for so long that i just thought that # indicated a decimal character where $ indicated the same in hex... granted, this is the first time i've wanted to do this in many years... previously in TP/BP (i've never done anything with delphi) i had to resort to putting in the actual characters which i wanted to bypass this time...

thanks for the information... things have changed in all these years O:)





More information about the fpc-pascal mailing list