I have define a string with :
TBuf8<128> Buffer;

The string is readed from a binary file. The first 2 bytes of the Buffer are :

04 00 (i.e. the value of 4)

I must convert this content of the Buffer into a TInt16 which must receive the value of 4, I have try the following :

TLex lex;
TInt16 abc;
lex.Assign( Buffer );
lex.Val( abc );

but the 'abc' content is always 0 !! I thing it's due to the format and the '00' after the '04' ....

Any idea are welcome,
Thanks a lot,
Dominique HUGO.