Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.pascal.borland    |    Borland Pascal was actually pretty neat    |    2,978 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,851 of 2,978    |
|    Skybuck Flying to All    |
|    type pointer to record before record.    |
|    28 Apr 11 20:56:57    |
      XPost: alt.comp.borland-delphi, alt.comp.lang.pascal       From: IntoTheFuture@hotmail.com              Hello,              In free pascal/pascal/delphi it's necessary to declare a pointer to a       record, which is to be used inside the record to point to itself, before the       record itself without a type directive in between them for example:              // correct:       type        PMyRecord = ^TMyRecord;        TMyRecord = record        mSelf : PMyRecord;        mNext : PMyRecord;        end;              // incorrect/not allowed:       type        PMyRecord = ^TMyRecord; // above type anywhere else.              type        TMyRecord = record        mSelf : PMyRecord;        mNext : PMyRecord;        mPrev : ^TMyRecord; // not allowed.        end;               PMyRecord = ^TMyRecord; // below anywhere else              // and so forth...              I would first like to remark about this: "This is very newb unfriendly...       newbs might not know this... and will get frustrated by this       weird/odd/non-intuitive language construction".              Now some question about this:              1. Is there a compiler-related technical reason why it has to be like this ?       If so explain shortly...              2. Is there perhaps a technical solution for it so this is no longer       required ? If so how much effort would a solution cost ?              3. (Does free pascal still follow these restrictions ? I guess so... )              Final question assuming it's solvable::              4. Do you think it's worth to solve this oddity and make the language more       newb friendly and more intuitive ?              5. Would it break anything ? (I think not... it would be an       extension/relaxation of the language...)              Bye,        Skybuck.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca