Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does “:” mean in Pseudocode?

Tags:

pseudocode

I'm a little new to pseudocode, What does : mean in pseudocode?

For example:

X ← copy(C[s − a : s + len])
like image 727
user3464190 Avatar asked Mar 26 '14 12:03

user3464190


2 Answers

X ← copy(C[s − a : s + len])

From s - a to s + len.

like image 127
Maroun Avatar answered Sep 29 '22 23:09

Maroun


Since pseudocode is an informal description of code, any particular piece of pseudocode means whatever the author intended it to mean. Usually the meaning is either obvious from context or the author provides some kind of key to the symbols they use.

In this case, the colon appears to be a range operator. But, you should not take that to mean that it will always be a range operator in any other pseudocode that you run across.

like image 26
Ferruccio Avatar answered Sep 29 '22 22:09

Ferruccio