Spinroot

A forum for Spin users

You are not logged in.

#1 2011-10-06 11:11:11

KeesPronk
Member
Registered: 2011-01-04
Posts: 12

assignment to _pid

In the manual page on _pid it is stated:

  _pid - a predefined, local, read-only variable ....
and
  It is an error to attempt to assign a new value to this variable,

However, spin will happily accept the following program:

active proctype(){
  _pid = _pid + 3;
}

init{
  _pid = _pid * 2;
}

When I print the value of _pid before/after the assignment, I notice that the value has not changed which is OK semantically.
But that seems a bit different from "It is an error" ?

Offline

#2 2011-10-06 14:35:32

spinroot
forum
Registered: 2010-11-18
Posts: 691
Website

Re: assignment to _pid

Very good observation.
I'll see if I can fix this.
Thanks!

Offline

Board footer

Powered by FluxBB