2
I’m learning to use the visual g through this stuff here: http://eletrica.ufpr.br/~Rogerio/visualg/Help/linguagem2.htm
In this particular code I have a very small question, which contains no answers neither in the material nor in google.
algoritmo "exemplo"
var x: real
y: inteiro
a: caractere
l: logico
inicio
x <- 2.5
y <- 6
a <- "teste"
l <- VERDADEIRO
escreval ("x", x:4:1, y+3:4) // Escreve: x 2.5 9
escreval (a, "ok") // Escreve: testeok (e depois pula linha)
escreval (a, " ok") // Escreve: teste ok (e depois pula linha)
escreval (a + " ok") // Escreve: teste ok (e depois pula linha)
escreva (l) // Escreve: VERDADEIRO
fimalgoritmo
What I don’t understand is how x(2.5):4:1 equals 2.5 ? Type, the character ' : ' has no value and why the numbers 4 and 1?
I didn’t understand what this character ' means and how it influences or not the results.
I found the documentation confusing, I preferred to see which language was based on this behavior and look there.
– Jefferson Quesado