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
The issue of the scroll b...
by
jianwt
[
Today
at 03:35:22 am]
How can I uninstall the p...
by
xiyi0616
[
Today
at 02:58:30 am]
Does anyone have experien...
by
xiyi0616
[
Today
at 02:31:06 am]
Youtube Downloader in Pas...
by
yus
[
Today
at 01:40:58 am]
Debugger regression in La...
by
TheMouseAUS
[
Today
at 01:26:53 am]
Lazarus & FPC documentati...
by
wp
[
Today
at 01:26:50 am]
Not happy with TTimeEdit
by
gues1
[July 16, 2025, 10:58:04 pm]
THUMBBUTTON does not work...
by
ASerge
[July 16, 2025, 09:22:18 pm]
Lazarus Release 4.0
by
ManoelJr
[July 16, 2025, 08:35:45 pm]
fpc in [home] folder not ...
by
DonAlfredo
[July 16, 2025, 08:32:39 pm]
Debugger use on OBJECT ty...
by
Martin_fr
[July 16, 2025, 08:16:43 pm]
RuntimeError 103 File not...
by
gues1
[July 16, 2025, 07:51:44 pm]
Asking for an example of ...
by
Thaddy
[July 16, 2025, 07:33:15 pm]
Why does $fpctarget not w...
by
n7800
[July 16, 2025, 07:13:24 pm]
Suddenly a build error? [...
by
TBMan
[July 16, 2025, 07:04:45 pm]
Is Lazarus still serious ...
by
Thaddy
[July 16, 2025, 05:10:53 pm]
TMemoryStream Question wi...
by
Thaddy
[July 16, 2025, 03:57:33 pm]
Problems with libraries f...
by
DonAlfredo
[July 16, 2025, 03:03:27 pm]
Possible Bug or Known Beh...
by
Aruna
[July 16, 2025, 02:48:41 pm]
It does not show my progr...
by
RayoGlauco
[July 16, 2025, 02:48:05 pm]
activex.pp DosDateTimeToV...
by
440bx
[July 16, 2025, 02:09:39 pm]
"Mario & Luigi" (1994-200...
by
Nimbus
[July 16, 2025, 12:14:31 pm]
UTF8 Keyboard entry
by
Thaddy
[July 16, 2025, 06:17:25 am]
Will there be a freezing ...
by
xiyi0616
[July 16, 2025, 04:25:25 am]
GitHub action setup-lazar...
by
Gustavo 'Gus' Carreno
[July 16, 2025, 01:03:07 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: The variant part of the record is always public (Read 1313 times)
ASerge
Hero Member
Posts: 2443
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: 17451
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: 2443
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