[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlaplus] Cannot define macro in pluscal.



The macro should be declared before the "begin" statement of the main algorithm.

Stephan

On 17 Feb 2022, at 04:22, thomas...@gmail.com <thomasgebert@xxxxxxxxx> wrote:

When I try and define a macro in pluscal like this (copied from the learntla website):

(*--algorithm test
variables A \in [ 1..N -> Int ], A0=A, piv;
begin

macro set_fork(fork, val) begin
     forks[fork] := val;
end macro;
piv := 0;

end algorithm *)


I get the error:

Expected ":=" but found "begin"

with the "begin" to the right of set_fork underlined. 

Am I doing anything obviously wrong?

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/8fe38819-8310-4c78-abf8-beeb171b580bn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/C7D4CDF3-781D-45F1-BF29-26359EA8E140%40gmail.com.