[fpc-pascal] How to know the string type of a variable?

Ralf Quint freedos.la at gmail.com
Mon Dec 30 20:53:09 CET 2013

On 12/30/2013 4:55 AM, Marco van de Voort wrote:
> In our previous episode, Michael Van Canneyt said:
>> procedure t(S : String);
>> begin
>>     if typeinfo(s)=typeinfo(shortstring) then
>>       Writeln('ShortString')
>>     else
>>       Writeln('Ansistring');
>> end;
>> begin
>>     t('');
>> end.
> Thank you, I saved it to my obfuscated Pascal mailfolder :-)
Yup, tagged this as "intersting" in my mail folder as well... 8-)

Hope that some little gem like this will make it somehow into the FPC 


This email is free from viruses and malware because avast! Antivirus protection is active.

More information about the fpc-pascal mailing list