How to declare a global Boolean variable?

View previous topic View next topic Go down

How to declare a global Boolean variable?

Post  ptroja on Wed Dec 19, 2012 8:03 am

Dear PAT experts,

it seems that all global variables in CSP# are of integer type, am I right?

Section 3.1.1.2 (Process Definitions) of the PAT (3.5) User Manual says that I can "store the returned value in a global Boolean variable," but how do I declare a one?

Thanks,
Piotr Trojanek

ptroja

Posts : 1
Join date : 2012-12-19

View user profile

Back to top Go down

Re: How to declare a global Boolean variable?

Post  pat team on Mon Dec 24, 2012 11:30 pm

you can just use following to declare a boolean var.
PAT doesn't do the type checking, so you can assign int value to b, but this is the way to declare bool var in PAT.

var b = false;

ptroja wrote:Dear PAT experts,

it seems that all global variables in CSP# are of integer type, am I right?

Section 3.1.1.2 (Process Definitions) of the PAT (3.5) User Manual says that I can "store the returned value in a global Boolean variable," but how do I declare a one?

Thanks,
Piotr Trojanek

pat team
Admin

Posts : 17
Join date : 2010-02-15

View user profile http://www.comp.nus.edu.sg/~pat/

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum