Re: [fpc-pascal] Question about functions returning a string

2014-11-29 Thread Ewald
On 11/29/2014 12:41 AM, Flávio Etrusco wrote: Are you sure it's not the result that is passed in the first parameter? http://en.wikipedia.org/wiki/X86_calling_conventions#cdecl Good question, but I don't think so. The first few lines of assembly from this function seem to read three arguments

Re: [fpc-pascal] Question about functions returning a string

2014-11-29 Thread Sven Barth
On 29.11.2014 13:56, Ewald wrote: On 11/29/2014 12:41 AM, Flávio Etrusco wrote: Are you sure it's not the result that is passed in the first parameter? http://en.wikipedia.org/wiki/X86_calling_conventions#cdecl Good question, but I don't think so. The first few lines of assembly from this

Re: [fpc-pascal] Type used to specialize a generic

2014-11-29 Thread silvioprog
On Sun Nov 23 18:03:55 CET 2014, Joao Morais wrote: Hello list, is there a safe way to know the PTypeInfo, or at least the string literal of the type(s) used to specialize a generic? Eg: TBarList = specialize TGenericListTBar On the sample above, starting with PTypeInfo of TBarList I

[fpc-pascal] FPC macros

2014-11-29 Thread Tim Blume
Hi, for several Pascal headers for C libraries it would be very nice, when macros defined in the interface section would be globally avaible. E.g. in Assimp there are macros like this: #define AI_MATKEY_NAME ?mat.name,0,0 Which I translated like this: {$DEFINE

Re: [fpc-pascal] FPC macros

2014-11-29 Thread leledumbo
for several Pascal headers for C libraries it would be very nice, when macros defined in the interface section would be globally avaible. It won't, it will be nice for your only particular case (save typing). See point #2 of http://freepascal.org/faq.var#extensionselect But since they are not