PAT Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How to declare a global Boolean variable?

2 posters

Go down

How to declare a global Boolean variable? Empty How to declare a global Boolean variable?

Post  ptroja 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

Back to top Go down

How to declare a global Boolean variable? Empty Re: How to declare a global Boolean variable?

Post  pat team 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

http://www.comp.nus.edu.sg/~pat/

Back to top Go down

Back to top

- Similar topics

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