cancel
Showing results for 
Search instead for 
Did you mean: 

syntax error Method inspect @. name

Pioneer
Pioneer

Hello,

 

I have syntax error for method inspect @. name

 

In the model from source i want to send object a, b,c to different line using Method.

 

But the method shows an syntax error.

 

Please anyone can suggest the solution for the problem.

4 REPLIES

Re: syntax error Method inspect @. name

Phenom
Phenom
you need to switch off the new syntax in the tab "Extras". In the new simtalk syntax inspect is replaced by switch - case.

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: syntax error Method inspect @. name

Pioneer
Pioneer

switch @.name
case "a"
@.umlagern(l2)
case "b"
@.umlagern(l3)

else
case"c"
@.umlagern(l1)
end

 

I have written this new code with  switch but still no result

Re: syntax error Method inspect @. name

Phenom
Phenom

after else you must not define a new case

attached you find the two variants


Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: syntax error Method inspect @. name

Pioneer
Pioneer

Thank you..for quick solution