# Return to Answer

 4 added 9 characters in body edited Feb 24 at 12:16 IMSoP 72444 silver badges1010 bronze badges Assuming this is the algorithm for a Fibonacci number generator, it represents simultaneous/parallel assignment; the comma is not separating two statements, but two operands to the `<-` operator. In `i, j <- 1`, both i and j are set to 1; it's just shorthand for `i <- 1` and `j <- 1`, which could happen in any order. In `i,j ← j,i + j`, it means `i <- j` and simultaneously `j <- i+j`. It's necessary for both to happen at once, because you need to use the original values of both variables. In a language without that facility, you'd have to introduce a temporary variable: ``````i2 <- i i <- j j <- i2 + j `````` or ``````j2 <- j j <- i + j i <- j2 `````` This may be based on a real language with this syntax, or it may just be a convenience for the algorithms being discussed. For instance, sort algorithms will often be written in a pseudocode with a "swap" operator of some sort, rather than the full set of instructions needed in a particular language, in order to focus on the most relevant details. Assuming this is the algorithm for a Fibonacci number generator, it represents simultaneous assignment; the comma is not separating two statements, but two operands to the `<-` operator. In `i, j <- 1`, both i and j are set to 1; it's just shorthand for `i <- 1` and `j <- 1`, which could happen in any order. In `i,j ← j,i + j`, it means `i <- j` and simultaneously `j <- i+j`. It's necessary for both to happen at once, because you need to use the original values of both variables. In a language without that facility, you'd have to introduce a temporary variable: ``````i2 <- i i <- j j <- i2 + j `````` or ``````j2 <- j j <- i + j i <- j2 `````` This may be based on a real language with this syntax, or it may just be a convenience for the algorithms being discussed. For instance, sort algorithms will often be written in a pseudocode with a "swap" operator of some sort, rather than the full set of instructions needed in a particular language. Assuming this is the algorithm for a Fibonacci number generator, it represents simultaneous/parallel assignment; the comma is not separating two statements, but two operands to the `<-` operator. In `i, j <- 1`, both i and j are set to 1; it's just shorthand for `i <- 1` and `j <- 1`, which could happen in any order. In `i,j ← j,i + j`, it means `i <- j` and simultaneously `j <- i+j`. It's necessary for both to happen at once, because you need to use the original values of both variables. In a language without that facility, you'd have to introduce a temporary variable: ``````i2 <- i i <- j j <- i2 + j `````` or ``````j2 <- j j <- i + j i <- j2 `````` This may be based on a real language with this syntax, or it may just be a convenience for the algorithms being discussed. For instance, sort algorithms will often be written in a pseudocode with a "swap" operator of some sort, rather than the full set of instructions needed in a particular language, in order to focus on the most relevant details. 3 added 65 characters in body edited Feb 24 at 10:43 IMSoP 72444 silver badges1010 bronze badges ItAssuming this is the algorithm for a Fibonacci number generator, it represents simultaneous assignment; the comma is not separating two statements, but two operands to the `<-` operator. In `i, j <- 1`, both i and j are set to 1; it's just shorthand for `i <- 1` and `j <- 1`, which could happen in any order. In `i,j ← j,i + j`, it means `i <- j` and simultaneously `j <- i+j`. It's necessary for both to happen at once, because you need to use the original values of both variables. In a language without that facility, you'd have to introduce a temporary variable: ``````i2 <- i i <- j j <- i2 + j `````` or ``````j2 <- j j <- i + j i <- j2 `````` This may be based on a real language with this syntax, or it may just be a convenience for the algorithms being discussed. For instance, sort algorithms will often be written in a pseudocode with a "swap" operator of some sort, rather than the full set of instructions needed in a particular language. It represents simultaneous assignment; the comma is not separating two statements, but two operands to the `<-` operator. In `i, j <- 1`, both i and j are set to 1; it's just shorthand for `i <- 1` and `j <- 1`, which could happen in any order. In `i,j ← j,i + j`, it means `i <- j` and simultaneously `j <- i+j`. It's necessary for both to happen at once, because you need to use the original values of both variables. In a language without that facility, you'd have to introduce a temporary variable: ``````i2 <- i i <- j j <- i2 + j `````` or ``````j2 <- j j <- i + j i <- j2 `````` This may be based on a real language with this syntax, or it may just be a convenience for the algorithms being discussed. For instance, sort algorithms will often be written in a pseudocode with a "swap" operator of some sort, rather than the full set of instructions needed in a particular language. Assuming this is the algorithm for a Fibonacci number generator, it represents simultaneous assignment; the comma is not separating two statements, but two operands to the `<-` operator. In `i, j <- 1`, both i and j are set to 1; it's just shorthand for `i <- 1` and `j <- 1`, which could happen in any order. In `i,j ← j,i + j`, it means `i <- j` and simultaneously `j <- i+j`. It's necessary for both to happen at once, because you need to use the original values of both variables. In a language without that facility, you'd have to introduce a temporary variable: ``````i2 <- i i <- j j <- i2 + j `````` or ``````j2 <- j j <- i + j i <- j2 `````` This may be based on a real language with this syntax, or it may just be a convenience for the algorithms being discussed. For instance, sort algorithms will often be written in a pseudocode with a "swap" operator of some sort, rather than the full set of instructions needed in a particular language. 2 added 346 characters in body edited Feb 24 at 9:18 IMSoP 72444 silver badges1010 bronze badges It represents simultaneous assignment; the comma is not separating two statements, but two operands to the `<-` operator. In `i, j <- 1`, both i and j are set to 1; it's just shorthand for `i <- 1` followed byand `j <- 1`, which could happen in any order. In `i,j ← j,i + j`, it means `i <- j` and simultaneously `j <- i+j`. It's necessary for both to happen at once, because you need to use the original values of both variables. In a language without that facility, you'd have to introduce a temporary variable: ``````i2 <- i; i i <- j; j j <- i2 + j `````` or ``````j2 <- j; j j <- i + j; j i <- j2 `````` This may be based on a real language with this syntax, or it may just be a convenience for the algorithms being discussed. For instance, sort algorithms will often be written in a pseudocode with a "swap" operator of some sort, rather than the full set of instructions needed in a particular language. It represents simultaneous assignment; the comma is not separating two statements, but two operands to the `<-` operator. In `i, j <- 1`, both i and j are set to 1; it's just shorthand for `i <- 1` followed by `j <- 1`. In `i,j ← j,i + j`, it means `i <- j` and simultaneously `j <- i+j`. It's necessary for both to happen at once, because you need to use the original values of both variables. In a language without that facility, you'd have to introduce a temporary variable: ``````i2 <- i; i <- j; j <- i2 + j `````` or ``````j2 <- j; j <- i + j; i <- j2 `````` It represents simultaneous assignment; the comma is not separating two statements, but two operands to the `<-` operator. In `i, j <- 1`, both i and j are set to 1; it's just shorthand for `i <- 1` and `j <- 1`, which could happen in any order. In `i,j ← j,i + j`, it means `i <- j` and simultaneously `j <- i+j`. It's necessary for both to happen at once, because you need to use the original values of both variables. In a language without that facility, you'd have to introduce a temporary variable: ``````i2 <- i i <- j j <- i2 + j `````` or ``````j2 <- j j <- i + j i <- j2 `````` This may be based on a real language with this syntax, or it may just be a convenience for the algorithms being discussed. For instance, sort algorithms will often be written in a pseudocode with a "swap" operator of some sort, rather than the full set of instructions needed in a particular language. 1 answered Feb 24 at 9:13 IMSoP 72444 silver badges1010 bronze badges