Recent

Author Topic: I don't understand Pascal record syntax  (Read 3841 times)

furious programming

  • Hero Member
  • *****
  • Posts: 853
Re: I don't understand Pascal record syntax
« Reply #15 on: June 10, 2019, 02:08:37 pm »
Ok, thanks for the example code.

If this is not clear enough I can give you an example based on the Raspberry Pi GPIO (but that is atm not very clean, since I change it too much and it is not under version control, unlike most of my code)

It is clear enough, so more examples will not be needed for me. Unless for others interesting.

I know how sets work and I use their functionality myself. I was just curious about why you declared a set of logical values in your example. I could not come up with the sense of such a collection. 8)
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

Thaddy

  • Hero Member
  • *****
  • Posts: 14215
  • Probably until I exterminate Putin.
Re: I don't understand Pascal record syntax
« Reply #16 on: June 10, 2019, 03:42:57 pm »
That was with a relay in mind. 8)
But I hope you appreciate the more elaborate example. The technique is really very powerful.
Specialize a type, not a var.

furious programming

  • Hero Member
  • *****
  • Posts: 853
Re: I don't understand Pascal record syntax
« Reply #17 on: June 11, 2019, 03:58:08 am »
But I hope you appreciate the more elaborate example.

Of course, interesting examples are never enough, even if they concern the basics.
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

 

TinyPortal © 2005-2018