Cancel
Showing results for 
Search instead for 
Did you mean: 

how to program the statement by simtalk2.0 which the function returns boolean?

Valued Contributor
Valued Contributor

hello,everyone!

 

As is shown in the following ,this statement is part of function programed by simtalk1.0 which means returning a boolean,Now my problem is that how to program it by simtalk2.0?

 

(trackSmiley Surprisedbject;sensorFrom:integer;sensorTo:integer)
:boolean

 

looking forward to your directions! 

Any help is great appreciated!

2 REPLIES

Re: how to program the statement by simtalk2.0 which the function returns boolean?

Siemens Phenom Siemens Phenom
Siemens Phenom

You can let Plant Simulation convert SimTalk 1.0 code to SimTalk 2.0 :
Insert an empty Method and open it in the Method Editor.
In the ribbon deactivate the setting "Tools > New Syntax".
Enter the SimTalk 1.0 code (note that you will need "is do end;") and click Apply.
Activate "Tools > New Syntax".

=> Plant Simulation automatically converts the source code to SimTalk 2.0 :
param track: object, sensorFrom: integer, sensorTo: integer -> boolean

 

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: how to program the statement by simtalk2.0 which the function returns boolean?

Valued Contributor
Valued Contributor
Hi,MichaelJoos!

Thank you,it runs successfully!