Вопрос

I'm finishing a Scilab project for school, and I've added comments to all my function based on this passage from the documentation:

Inside a function, the first comment lines, up to the first instruction or an empty line may be used to provide the default contents for the function help.

Yet help does not display the comments when I type help myfunction. Instead, it launches the help browser, on the search page.

Any ideas? Basically I'm looking for an equivalent of Matlab's "H1 lines" and "Help text".

Это было полезно?

Решение

The right instruction is

head_comments myfunction

When there is no native function named myfunction and myfunction is known as a user-defined one, indeed it would be fine to use directly

help myfunction

This wish is reported @ http://bugzilla.scilab.org/10785

Другие советы

You have to use this function to convert comments to a help page: http://help.scilab.org/docs/current/en_US/help_from_sci.html and then compile it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top