Thank you very much.

2009/9/24 Jonas Maebe <jonas.ma...@elis.ugent.be>:
>
> On 24 Sep 2009, at 10:53, 章宏九 wrote:
>
>> 2009/9/24 Jonas Maebe <jonas.ma...@elis.ugent.be>:
>>>
>>>> I would like also to know the situation in C. (I mean
>>>> declaration of printf and scanf. Are they implemented in glibc or
>>>> gcc?)
>>>
>>> In glibc.
>>
>> Unlike pascal?
>
> Yes and no. In both Pascal and C, the internal functionality of the
> read/write (scan/print) code is in the run time library. However
> a) in Pascal, the compiler parses the types that you pass to the read/write
> code and directly calls the appropriate helper routines
> b) in C, the types are specified in the format string and the run time
> library itself determines the actual types at run time
>
> So scanf/printf are more complex than the Pascal read/write routines. FPC
> and Delphi nowadays also have printf/scanf-style routines though. They are
> called format and scanf (part of the sysutils unit).
>
>
> Jonas_______________________________________________
> fpc-pascal maillist  -  fpc-pas...@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to