Recent

Author Topic: Writable consts...?  (Read 2103 times)

cdbc

  • Hero Member
  • *****
  • Posts: 1645
    • http://www.cdbc.dk
Re: Writable consts...?
« Reply #15 on: July 12, 2024, 10:12:14 am »
Hi
@Thaddy & @ASerge: You guys are early risers  :D
Well, Ok - on my second cuppa'joe...
Thanks for the input, the story goes like this:
My plan is to offer the user, some sensible defaults, which (s)he can choose to keep, or replace with whatever they'd like, even add or subtract directories, if need be. Compiler wouldn't let me define an initialized variable in that particular place, that's how I came about the 'writable const' idea... So I'd actually like to keep the default {$J+}  8)
That makes the push/pop situation moot.
Quote
Benny, check the assembler that is generated and you will immediately see the difference.
That's my dang problem, I'm *not* well versed in ASM ...at all! Some bits'n' pieces may make sense to me, but.... Just never got around to it...
The code works quite well, till now; today I'll forge a data-entry-form and see how I fair, with changing the default values in the 'writable const'... %)
So far so good, thank you.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Thaddy

  • Hero Member
  • *****
  • Posts: 16145
  • Censorship about opinions does not belong here.
Re: Writable consts...?
« Reply #16 on: July 12, 2024, 11:47:46 am »
What? a Dane not versed in assembler? ;D
btw, the terminology has changed to a better to understand "writeable static variable" in the documentation. The reason is pre-object orientation and keeps state.
« Last Edit: July 12, 2024, 12:18:50 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

cdbc

  • Hero Member
  • *****
  • Posts: 1645
    • http://www.cdbc.dk
Re: Writable consts...?
« Reply #17 on: July 12, 2024, 11:54:32 am »
Yup Thaddy, who'd have thunk it  :D ;D
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Thaddy

  • Hero Member
  • *****
  • Posts: 16145
  • Censorship about opinions does not belong here.
Re: Writable consts...?
« Reply #18 on: July 12, 2024, 06:59:01 pm »
Ok,Ok, I will write up where the Danes are responsible for: F#, C#, C++, TP, Delphi and eventually...probably the next important language, except Python which is Dutch and C is not a language but a cludge. Have a nice weekend..
(not by any means complete ... partially accurate)
« Last Edit: July 12, 2024, 07:03:21 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

cdbc

  • Hero Member
  • *****
  • Posts: 1645
    • http://www.cdbc.dk
Re: Writable consts...?
« Reply #19 on: July 12, 2024, 08:30:45 pm »
Hey Thaddy
Sorry for the late response, I'm in the middle of painting our carport...  %)
I must admit, I'm quite fond of Anders' work  8-)
Bjarne's on the other hand, feels to me, more like bolting 4 extra legs onto a donkey and calling it an Octopus... :D
...migth have 8 legs, but still this annoying braying  :D 8) ;D
Have a nice weekend my friend
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Thaddy

  • Hero Member
  • *****
  • Posts: 16145
  • Censorship about opinions does not belong here.
Re: Writable consts...?
« Reply #20 on: July 12, 2024, 09:41:46 pm »
( there is a secret hidden in my message and you spotted it ) :)
 car port painting is more .., well, not, .. my issue because I have a car port, but no car..
I only have a license to drive a main battle tank. which has probably expired.
(rijvaardigheidbewijs rupsvoertuigen, I was a tank commander at 19)
my rank is captain, retired, acting major. but that does not matter, I was a simple tank commander.
« Last Edit: July 12, 2024, 09:54:35 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

 

TinyPortal © 2005-2018