Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Comparison operator
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
Recent
OPC client with Lazarus
by
TheMouseAUS
[
Today
at 04:56:43 am]
would multi threading hel...
by
speter
[
Today
at 02:14:14 am]
[Windows] UTF8 encoding w...
by
PascalDragon
[January 22, 2026, 09:51:05 pm]
Difference in formatting ...
by
Fred vS
[January 22, 2026, 09:09:29 pm]
Developing FreePascal on ...
by
ccrause
[January 22, 2026, 06:14:41 pm]
Lazarus in Windows allowe...
by
vinntec
[January 22, 2026, 06:01:29 pm]
Perlin Map 3D
by
Boleeman
[January 22, 2026, 05:47:15 pm]
PasTemplates - a go-like ...
by
CynicRus
[January 22, 2026, 05:35:57 pm]
Strange Error when I use ...
by
TYDQ
[January 22, 2026, 03:14:50 pm]
FPCupDeluxe unable to bui...
by
Martin_fr
[January 22, 2026, 02:57:15 pm]
Rolling releases Lazarus[...
by
marcov
[January 22, 2026, 01:50:56 pm]
TRichMemo install shows "...
by
vinntec
[January 22, 2026, 01:36:50 pm]
Lazarus Bugfix Release 4...
by
Martin_fr
[January 22, 2026, 08:12:20 am]
Register global hotkey
by
Thaddy
[January 22, 2026, 06:28:54 am]
X11Libre, finally and for...
by
Fred vS
[January 21, 2026, 10:20:53 pm]
What's wrong with my appl...
by
bourbon
[January 21, 2026, 09:04:40 pm]
How to observe the value ...
by
nouzi
[January 21, 2026, 06:26:13 pm]
Anti "churning" in solita...
by
TBMan
[January 21, 2026, 04:30:05 pm]
Lazarus for Windows on aa...
by
msintle
[January 21, 2026, 03:11:13 pm]
Perlin Noise Map With BGR...
by
Boleeman
[January 21, 2026, 01:36:13 pm]
Strange Mail from memo.mi...
by
Thaddy
[January 21, 2026, 01:27:19 pm]
[Solved] Lazreport. Sorti...
by
Petrus Vorster
[January 21, 2026, 11:39:09 am]
Regarding the issue of de...
by
Martin_fr
[January 21, 2026, 11:16:29 am]
Pleas help, Synapse / Ind...
by
patyit
[January 21, 2026, 10:25:29 am]
Default, Manual Initializ...
by
Okoba
[January 21, 2026, 09:17:22 am]
« previous
next »
Print
Pages:
1
[
2
]
Author
Topic: Comparison operator (Read 2296 times)
marcov
Administrator
Hero Member
Posts: 12598
FPC developer.
Re: Comparison operator
«
Reply #15 on:
November 18, 2024, 10:35:47 am »
Quote from: jamie on November 18, 2024, 01:27:15 am
You can shorten that up using the CompareMem.
Will fail if your T record contains automated types.
Logged
Thaddy
Hero Member
Posts: 18707
To Europe: simply sell USA bonds: dollar collapses
Re: Comparison operator
«
Reply #16 on:
November 18, 2024, 10:45:17 am »
You simply can't use comparemem in the general case anyway, there are simply too many exceptions especially if locals are compared.
Logged
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...
Warfley
Hero Member
Posts: 2037
Re: Comparison operator
«
Reply #17 on:
November 18, 2024, 10:48:57 am »
Quote from: jamie on November 18, 2024, 01:27:15 am
You can shorten that up using the CompareMem.
Only if you have memory comparable types. Not all types are memory comparable. AnsiStrings and Dynamic Arrays for example aren't (and thereby also any composite type like arrays or records that contain those) and those are pretty common default types. And of course because Pascal allows for operator overloading you can easily define your own types with their own equality operators that do special comparisons.
«
Last Edit: November 18, 2024, 10:51:21 am by Warfley
»
Logged
GitHub:
https://github.com/Warfley
Print
Pages:
1
[
2
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
Comparison operator
TinyPortal
© 2005-2018