How do you make a command now mark_as_command has gone?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How do you make a command now mark_as_command has gone?

Richard Kirk
The octave.info 11.11 section describes commands, so I presume they still exist. However, I can't see how to make them now mark_as_command has gone, but some standard functions still accept the command line syntax.

This is not urgent or anything, as I can always use the traditional syntax. I expect the information is there somewhere, but  It is hard to search as 'command' is a pretty common word, and searching on 'mark_as_command' doesn't help.

Thanks.
Richard Kirk

Reply | Threaded
Open this post in threaded view
|

Re: How do you make a command now mark_as_command has gone?

Jordi Gutiérrez Hermoso-2
On Mon, 2013-09-16 at 08:11 -0700, Richard KIrk wrote:

> The octave.info 11.11 section describes commands, so I presume they
> still exist. However, I can't see how to make them now
> mark_as_command has gone, but some standard functions still accept
> the command line syntax.

All functions accept command syntax. For example,

    sin 1

is the same as

    sin("1")

which, of course, is the same as

    sin(49)

Command syntax is nothing but syntactic sugar for passing all strings
to a function, and any function can be called this way.

> This is not urgent or anything, as I can always use the traditional
> syntax. I expect the information is there somewhere, but It is hard
> to search as 'command' is a pretty common word, and searching on
> 'mark_as_command' doesn't help.

I'm not exactly sure what you're looking for. Is there something that
needs to be modified in the documentation?

- Jordi G. H.


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave