A
Arno van der Ende
Guest
Hi Frank, yes, that's the normal IF... THEN... ELSE statement, like other languages also have, but sequentially also have the ternary operator. Example how this could be in 4GL: result = (random(1,100) mod 2 = 0) ? "even" : "odd". In the end not that different, except it becomes a bit more readable, because it is shorter. Certainly in messages or logging this is handy to have. For example: LOG-MANAGER:WRITE-MESSAGE ("Good morning " + (p.female ? "Miss " : "Mister ") + p.name)
Continue reading...
Continue reading...