Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
[SOLVED] how to ranslate this macro
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
Heap Overflow with millio...
by
grawlix
[
Today
at 06:57:25 pm]
Fpcupdeluxe
by
Thausand
[
Today
at 06:48:17 pm]
Problem Installing CHM He...
by
marcov
[
Today
at 05:03:32 pm]
Bindings for PlutoVG
by
CynicRus
[
Today
at 04:49:28 pm]
Lazarus Bugfix Release 4...
by
Martin_fr
[
Today
at 04:48:44 pm]
Lazarus 4.4 documentation...
by
dsiders
[
Today
at 04:13:58 pm]
AArch64. Slow program sta...
by
Thaddy
[
Today
at 04:00:35 pm]
Creating a fully cross pl...
by
Thaddy
[
Today
at 03:51:55 pm]
UnoLib - library in Pasca...
by
ackarwow
[
Today
at 01:06:58 pm]
Help with search and repa...
by
Zvoni
[
Today
at 12:35:12 pm]
Lazarus caught AV, seems ...
by
Martin_fr
[
Today
at 12:20:47 pm]
Porting PDF Viewer from D...
by
domasz
[
Today
at 11:31:03 am]
Anyone interested in help...
by
ad1mt
[
Today
at 11:07:12 am]
Feature request: Default ...
by
Hansaplast
[
Today
at 10:00:51 am]
Getting a true variant pa...
by
440bx
[
Today
at 09:05:26 am]
application crashes on st...
by
Thaddy
[
Today
at 08:30:33 am]
synedit
by
scasparz
[
Today
at 08:21:38 am]
BGRA Themes - Themed cont...
by
Froxter
[
Today
at 08:21:20 am]
Initialize list in functi...
by
PeterHu
[
Today
at 06:44:38 am]
FPC v3.2.2 internal error
by
PascalDragon
[November 10, 2025, 09:52:00 pm]
FPC 3.2.4-rc1 available
by
JdeHaan
[November 10, 2025, 09:40:36 pm]
How to implement uKey-bas...
by
delphius
[November 10, 2025, 09:25:12 pm]
[SOLVED] Heaptrc reports ...
by
Bart
[November 10, 2025, 07:06:57 pm]
Lazarus Blowfish
by
rvk
[November 10, 2025, 05:17:17 pm]
An Idea for a helpful uti...
by
Curt Carpenter
[November 10, 2025, 04:33:20 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] how to ranslate this macro (Read 866 times)
Key-Real
Sr. Member
Posts: 395
[SOLVED] how to ranslate this macro
«
on:
June 21, 2024, 01:52:52 pm »
how to ranslate this macro in pascal?
Code: Pascal
[Select]
[+]
[-]
#define limitRange
(
x
,
l
,
h
)
(
(
x
)
=
(
(
x
)
<
(
l
)
?
(
l
)
:
(
x
)
>
(
h
)
?
(
h
)
:
(
x
)
)
)
«
Last Edit: June 21, 2024, 02:25:27 pm by Key-Real
»
Logged
Demo Scene
,
FlyTracker
,
FPC for PlayStation 1
,
my Repos
Fibonacci
Hero Member
Posts: 788
Internal Error Hunter
Re: how to ranslate this macro
«
Reply #1 on:
June 21, 2024, 02:08:23 pm »
Code: Pascal
[Select]
[+]
[-]
procedure
limitRange
(
var
x
:
integer
;
l
,
h
:
integer
)
;
inline
;
begin
if
x < l
then
x
:
=
l
else
if
x > h
then
x
:
=
h
;
end
;
Logged
Bart
Hero Member
Posts: 5614
Re: how to ranslate this macro
«
Reply #2 on:
June 21, 2024, 02:10:44 pm »
We have EnsureRange() in Math unit for that?
Bart
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
[SOLVED] how to ranslate this macro
TinyPortal
© 2005-2018