Default record fields
(too old to reply)
Ryan Joseph
2018-07-08 18:07:47 UTC
I posted this on the main list before but I want to repost here. Last month I decided finally after years to try working on the compiler and in short time I was able to add parameters to macros (like in C). The FPC list appeared to universally despise this idea so I guess I’ll just sit on it and take it as a learning experience if nothing else.

The next idea I had was to add default values to record fields (like I use in C++, C#, Swift etc…) but I got some upset tones from people on this also, albeit not so bad. Anyways I decided (as a learning experience) I would try to implement this also but it’s probably too complicated to figure out on my own and without understanding even the basics of the how the compiler works. I chose this one area because it’s a problem I personally have with FPC and miss from C++ and I thought that it might be doable for a beginner.

I was able to parse out default values in fields but 1) I’m not sure what exactly a “value” *is* in terms of the compiler and 2) I don’t understand how variables are assigned those values. There’s lots of TDef/TSym etc.. and it’s difficult to understand what they’re used for.

If I post some more specifics is anyone interested in helping me do this or answering basic questions on the compiler architecture?

Ryan Joseph

fpc-devel maillist - fpc-***@lists.freepascal.org