Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
FPC development
(Moderators:
FPK
,
Tomas Hajny
) »
The variant part of the record is always public
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
WIKI Timeout issues
Please read here if you have trouble connecting to the wiki
Recent
Is Lazarus still serious ...
by
dryzone
[July 14, 2025, 11:54:43 pm]
how to create different c...
by
cdbc
[July 14, 2025, 11:12:26 pm]
Record Locked
by
CharlyTango
[July 14, 2025, 09:13:45 pm]
Compare two text lines an...
by
avk
[July 14, 2025, 06:18:31 pm]
Has anyone installed TeeB...
by
Nicole
[July 14, 2025, 05:50:26 pm]
x86_64-win64 annoys me
by
Nicole
[July 14, 2025, 05:41:04 pm]
Why does $fpctarget not w...
by
Gustavo 'Gus' Carreno
[July 14, 2025, 05:24:04 pm]
activex.pp missing functi...
by
marcov
[July 14, 2025, 05:00:03 pm]
Fpcupdeluxe
by
ginoo
[July 14, 2025, 04:45:28 pm]
[Solved] Building warning...
by
Thaddy
[July 14, 2025, 03:33:57 pm]
Bug if FileListBox.Sorted...
by
Thaddy
[July 14, 2025, 03:26:52 pm]
generic Class for any Typ...
by
Khrys
[July 14, 2025, 03:00:42 pm]
LazProjectGroups: key map...
by
CCRDude
[July 14, 2025, 02:10:05 pm]
Loadfromstream return som...
by
marcov
[July 14, 2025, 02:02:48 pm]
Fast Canvas Library V1.05...
by
Gigatron
[July 14, 2025, 01:47:23 pm]
"Mario & Luigi" (1994-200...
by
paule32
[July 14, 2025, 01:09:14 pm]
Setting up an ARM embedde...
by
Ruptor
[July 14, 2025, 12:14:28 pm]
LMath and Components 0.6....
by
wp
[July 14, 2025, 11:40:02 am]
[S]Call anchor editor for...
by
Martin_fr
[July 14, 2025, 11:32:30 am]
new private messages fly ...
by
Nitorami
[July 14, 2025, 10:14:05 am]
[SOLVED] SQLite query to ...
by
Zvoni
[July 14, 2025, 09:30:48 am]
Sharing utilities
by
lucabertoncini
[July 14, 2025, 09:01:00 am]
Triple Gosper Space Filli...
by
Thaddy
[July 14, 2025, 07:17:33 am]
Program vs Simple Program...
by
ASBzone
[July 14, 2025, 06:43:56 am]
replace the Executable St...
by
paule32
[July 14, 2025, 04:25:38 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: The variant part of the record is always public (Read 1312 times)
ASerge
Hero Member
Posts: 2439
The variant part of the record is always public
«
on:
June 15, 2024, 04:45:35 pm »
Code: Pascal
[Select]
[+]
[-]
{$MODE OBJFPC}
{$MODESWITCH ADVANCEDRECORDS}
type
TRec
=
record
strict
private
case
Selector
:
Byte
of
1
:
(
PartInt
:
Integer
)
;
2
:
(
PartBool
:
Boolean
)
;
end
;
var
R
:
TRec
;
begin
//R.Selector := 1; // project1.lpr(15,5) Error: identifier idents no member "Selector"
R
.
PartInt
:
=
55
;
// No error
end
.
Please test this in the latest version of Delphi, is it the same in it?
Logged
Thaddy
Hero Member
Posts: 17423
Ceterum censeo Trumpum esse delendum (Tnx Charlie)
Re: The variant part of the record is always public
«
Reply #1 on:
June 16, 2024, 08:54:47 am »
Delphi 11 errors as it should.
Logged
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.
ASerge
Hero Member
Posts: 2439
Re: The variant part of the record is always public
«
Reply #2 on:
June 16, 2024, 02:14:54 pm »
Quote from: Thaddy on June 16, 2024, 08:54:47 am
Delphi 11 errors as it should.
Thanks.
https://gitlab.com/freepascal.org/fpc/source/-/issues/40824
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
FPC development
(Moderators:
FPK
,
Tomas Hajny
) »
The variant part of the record is always public
TinyPortal
© 2005-2018