Portugol have ternary operator?

6

Does Portugol have any ternary operators?

Example how it works in various languages:

algumaVar = 10 > 0 ? 8 : 4

Just out of curiosity, it would be interesting if it had.

    
asked by anonymous 16.02.2017 / 20:20

2 answers

10

It does not.

I will revisit the VisualGen references and do not talk about ternary operators.

It's a bit of an opinion, but I think it makes sense, since Portuguese is only used for teaching purposes, so it needs to be readable and compressible and the more explicit, the better to read.

    
16.02.2017 / 20:49
1

To assert the non-existence of something, I must be a profound expert on the subject, which is not my case. But many materials on Portugol, some seemed very complete, and I never saw anything like it.

It makes sense because this operator is a convenience and in a learning language it does not make sense to have something like this.

    
16.02.2017 / 20:50