Skip to content
This repository has been archived by the owner on Mar 13, 2020. It is now read-only.

Parens need to be used for many cases of outputs #15

Closed
connoralbright opened this issue Jan 23, 2017 · 1 comment
Closed

Parens need to be used for many cases of outputs #15

connoralbright opened this issue Jan 23, 2017 · 1 comment

Comments

@connoralbright
Copy link

connoralbright commented Jan 23, 2017

Invalid:
DO[19:Vaccum_Status]=RO[1:Vaccum] ;
Valid:
DO[19:Vaccum_Status]=(RO[1:Vaccum]) ;

This seems to be true for most types of outputs when not using On, Off, Pulse, or R[n].

In io_node.rb, this line seems relevant:
options[:force_parens] ? "(#{s})" : s

As a workaround, in TP+, manually placing the parens in the .tpp code works:
Vaccum_Status = (Vaccum)

@unreal
Copy link
Member

unreal commented Jan 23, 2017

hmm, one might argue this is another one of those cases that should be fixed in TP ;)

TP+'s type-checking and handling of parens/mixed-logic is pretty bad and needs major work.

@unreal unreal closed this as completed in d37668f Jan 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants