Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tenary operator in QB64 with 4 numbers
#3
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"?
Reply


Messages In This Thread
RE: Tenary operator in QB64 with 4 numbers - by Kernelpanic - 8 hours ago



Users browsing this thread: 3 Guest(s)