Login | Register 
Products Applications Downloads Features Wiki forum Store
 

RESOLVED: Unexpected textport error messages on regular coms

Report bugs so we can squash them!

RESOLVED: Unexpected textport error messages on regular coms

Postby ab30 » Thu Jul 26, 2012 10:08 am

When i type into the texport, for testing purposes, somme regular commands, it often echoes an unexpected error message.

By example a chop command of the form:
Code: Select all
chop("path:channel")


which does work in an operator parameter, echoes the following error message into the textport:

Code: Select all
Textport (line 0 - ): Command 'chop' not specific enough. Shorthand commands are also deprecated.


Is it a bug ?
ab30
 
Posts: 241
Joined: Fri Apr 27, 2012 10:36 am

Re: Unexpected textport error messages on regular commands

Postby malcolm » Thu Jul 26, 2012 10:16 am

This is probably the more confusing part of tscript. Things like 'chop' are expressions, which are different from commands. You can type commands into the textport and they will just work. For expressions you need to place them in backticks and echo the result.

echo `chop("path:channel")`

This is also true if you put chop() inside a parameter that expects a string. The backticks are how to tell the interpreter that you are giving something that should be evaluated, not just a string.

The main difference between an expression and a command is that a command does something, while an expression only ever returns a result, they never change the state of the system (except for possibly cooking nodes to get their results).
User avatar
malcolm
Staff
 
Posts: 2183
Joined: Tue Nov 13, 2007 12:11 am

Re: Unexpected textport error messages on regular commands

Postby ab30 » Thu Jul 26, 2012 10:38 am

Yet i knew about the difference between expressions and commands, but surely the "Command 'chop' not specific enough" message got me more confused, strenghtening the erroneous thought that it was a command...

Thanks for having clarified this up
ab30
 
Posts: 241
Joined: Fri Apr 27, 2012 10:36 am


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest