[Lazarus] record literal in FPC?
xrfang at gmail.com
Wed Jan 9 13:00:46 CET 2013
Well, my purpose is to make the source code look comfortable, not how the binary code is generated :)
Well, again, I got a good idea from Andreas.
Thanks to all of you.
在 三, 1月 9, 2013 at 7:45 下午，leledumbo <leledumbo_cool at yahoo.co.id> 写道：
> As far as I know pascal inline directive only affect the compiler, not how
you write code. Could you please give an example how inline function helps
in my question?
Yes it does, what I mean is to create something that Point() function does
and using inline directive it's nearly the same as assigning record via
literal. Well, if you know how it's done by other compilers, record literal
assignment is actually broken down into field by field assignment. So if you
make a function that returns the record with given arguments as record
fields, with inline directive the final code would be the same. Well...
maybe you'll need some other directives as well, but it's just my thought. I
never really compare the generated code...
View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-record-literal-in-FPC-tp4028464p4028478.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus