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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
TSynCompletion filtering ...
by
Wesbat
[
Today
at 10:44:41 pm]
How make the GUI as one p...
by
dsiders
[
Today
at 10:40:29 pm]
Current GTK2 and GTK3 Sta...
by
dsiders
[
Today
at 10:34:47 pm]
Starting a program with h...
by
jeremiah
[
Today
at 10:02:03 pm]
AVRPascal – free code edi...
by
ackarwow
[
Today
at 10:00:42 pm]
Button opens terminal (Li...
by
MarkMLl
[
Today
at 09:36:48 pm]
Animated GIF's and Lazaru...
by
Aruna
[
Today
at 09:31:37 pm]
How to copy file to web
by
bobonwhidbey
[
Today
at 09:20:16 pm]
Interesting article about...
by
440bx
[
Today
at 08:58:24 pm]
[Solved] Q: Debug a plugi...
by
d7_2_laz
[
Today
at 08:10:13 pm]
[Solved] TCheckGroup Chil...
by
TheLastCayen
[
Today
at 07:43:50 pm]
NSHapticFeedbackPerformer
by
msintle
[
Today
at 07:35:29 pm]
Another way to search the...
by
Handoko
[
Today
at 07:24:17 pm]
SDL2 Fit image rotation b...
by
Pe3s
[
Today
at 07:18:57 pm]
SAVE StringGrid to PDF
by
dseligo
[
Today
at 06:50:20 pm]
Error: External: FLT INVA...
by
krzynio
[
Today
at 06:23:56 pm]
Specializing a generic of...
by
Okoba
[
Today
at 05:26:07 pm]
[SOLVED] Classic objects ...
by
flowCRANE
[
Today
at 05:25:15 pm]
C operators and shift
by
VisualLab
[
Today
at 05:20:20 pm]
Lazarus for Windows on aa...
by
PascalDragon
[
Today
at 03:32:02 pm]
Common File Dialogs Have ...
by
rvk
[
Today
at 02:39:17 pm]
DBGrid editing control
by
silvercoder70
[
Today
at 12:43:29 pm]
IFS Fractals: Iterating t...
by
Joanna from IRC
[
Today
at 11:41:26 am]
Unwanted additional line ...
by
CM630
[
Today
at 08:55:13 am]
MainMenu: How to use the ...
by
rich2014
[
Today
at 02:45:31 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] how to ranslate this macro (Read 571 times)
Key-Real
Sr. Member
Posts: 372
[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
Fibonacci
Hero Member
Posts: 615
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: 5469
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