8 hours ago
(8 hours ago)Kernelpanic Wrote:Quote:@RhoSigma - The min/max functions also exist in C, so you could do it the same way as in BASIC there.I haven't found a max/min function in my C/C++ manuals, only something like this, via "#define ...": https://stackoverflow.com/questions/3437...d-max-in-c
1. The old C macro way:
Code: (Select All)
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
Where else can you find this selection option as it is possible in QB64, and so simple? In a programming language for "everyday use"?
https://legacy.cplusplus.com/reference/algorithm/min/
https://legacy.cplusplus.com/reference/algorithm/max/
GuiTools, Blankers & other Projects:
https://qb64phoenix.com/forum/forumdisplay.php?fid=32
Libraries & useful Functions:
https://qb64phoenix.com/forum/forumdisplay.php?fid=23
https://qb64phoenix.com/forum/forumdisplay.php?fid=32
Libraries & useful Functions:
https://qb64phoenix.com/forum/forumdisplay.php?fid=23