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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
[SOLVED] What is the name...
by
marcov
[
Today
at 01:05:31 am]
Lazarus on Mint - Palette...
by
TRon
[
Today
at 12:56:52 am]
Explaining Generics and S...
by
jamie
[
Today
at 12:45:19 am]
Where are the sources for...
by
flowCRANE
[
Today
at 12:38:54 am]
Online Package Manager
by
wp
[
Today
at 12:22:46 am]
Reading text out loud?
by
jamie
[
Today
at 12:02:05 am]
Speech from textbox
by
jamie
[March 22, 2025, 11:47:40 pm]
Подписи кнопок панели инс...
by
Miralok
[March 22, 2025, 11:33:50 pm]
How to delete from app il...
by
Boleeman
[March 22, 2025, 10:54:59 pm]
IDE tabs and spaces, auto...
by
OC DelGuy
[March 22, 2025, 09:51:53 pm]
Can't put Lazarus in dock
by
VTwin
[March 22, 2025, 08:33:23 pm]
TrayIcon doesn't work usi...
by
CM630
[March 22, 2025, 08:31:45 pm]
Uninstall
by
VTwin
[March 22, 2025, 08:09:22 pm]
Using Bresenham's line al...
by
Paolo
[March 22, 2025, 07:34:16 pm]
How to wirte a drag into ...
by
d2010
[March 22, 2025, 07:12:18 pm]
I'm wondering, what kind ...
by
Joanna from IRC
[March 22, 2025, 06:54:00 pm]
Cannot set width and heig...
by
anse
[March 22, 2025, 06:38:12 pm]
I want to get rid of priv...
by
n7800
[March 22, 2025, 06:33:54 pm]
Tcsvdataset issue
by
Packs
[March 22, 2025, 04:09:35 pm]
fpsSpreadsheet. Unable t...
by
dgrhoads
[March 22, 2025, 03:59:01 pm]
How to search unitColorGr...
by
d2010
[March 22, 2025, 03:03:19 pm]
LZ4 decompressor in pure ...
by
marcov
[March 22, 2025, 02:56:48 pm]
Snappy decompressor in pu...
by
ALLIGATOR
[March 22, 2025, 02:40:20 pm]
NIL vs. Assign: when to u...
by
PascalDragon
[March 22, 2025, 02:38:45 pm]
Laz mupdf (SumatraPDF loa...
by
Boleeman
[March 22, 2025, 01:28:54 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: The variant part of the record is always public (Read 1207 times)
ASerge
Hero Member
Posts: 2389
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: 16653
Kallstadt seems a good place to evict Trump to.
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
But I am sure they don't want the Trumps back...
ASerge
Hero Member
Posts: 2389
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