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
Possible Bug or Known Beh...
by
Aruna
[
Today
at 04:38:01 am]
Not happy with TTimeEdit
by
n7800
[
Today
at 03:09:32 am]
How can I uninstall the p...
by
xiyi0616
[
Today
at 02:35:48 am]
"Mario & Luigi" (1994-200...
by
_skrzyp_
[
Today
at 02:24:56 am]
How to catch error 400 ?
by
dbannon
[
Today
at 01:52:19 am]
fpc in [home] folder not ...
by
Gustavo 'Gus' Carreno
[
Today
at 01:23:59 am]
Problems with libraries f...
by
regs
[July 17, 2025, 11:43:14 pm]
Platforms to sell Pascal ...
by
paule32
[July 17, 2025, 10:31:43 pm]
Lazarus Release 4.0
by
Nicole
[July 17, 2025, 10:26:25 pm]
A small inconsistency
by
gues1
[July 17, 2025, 09:59:06 pm]
QT5 OpenGLContext
by
aydın
[July 17, 2025, 09:21:27 pm]
tSQLQuery.UpdateSQL with ...
by
JRBleau
[July 17, 2025, 09:18:11 pm]
TAChart how to make diffe...
by
tk
[July 17, 2025, 09:04:10 pm]
[SOLVED] Why does $fpctar...
by
PascalDragon
[July 17, 2025, 08:56:23 pm]
RuntimeError 103 File not...
by
PascalDragon
[July 17, 2025, 08:50:09 pm]
Suddenly a build error? [...
by
TBMan
[July 17, 2025, 07:26:44 pm]
Why is lazReport.Pages[0...
by
PEC120769
[July 17, 2025, 07:03:46 pm]
Circumvent the assignment...
by
Thaddy
[July 17, 2025, 06:43:32 pm]
Rotating Curves and Shift...
by
Boleeman
[July 17, 2025, 05:49:27 pm]
[SOLVED] THUMBBUTTON does...
by
ASerge
[July 17, 2025, 05:33:02 pm]
The issue of the scroll b...
by
Thaddy
[July 17, 2025, 03:41:33 pm]
Does anyone have experien...
by
xiyi0616
[July 17, 2025, 02:54:38 pm]
Multi Filter Module for D...
by
Fraay
[July 17, 2025, 02:03:51 pm]
Lazarus & FPC documentati...
by
Martin_fr
[July 17, 2025, 02:01:45 pm]
Debugger regression in La...
by
Martin_fr
[July 17, 2025, 01:35:24 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: The variant part of the record is always public (Read 1315 times)
ASerge
Hero Member
Posts: 2444
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: 17464
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: 2444
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