I shall endeavour to provide a humble explanation for that.
Generally speaking, language syntax in gretl consists of
three groups: commands, functions and “the rest”. Since it is an econometrics
software package, it deals with statistic datasets. If you tell it a command,
it does something: “info” describes a dataset in the output window, “ols y x”
estimates a model, “omit const” conducts
a test whether the intercept (constant term) can be treated as zero and omitted
etc. If you use a function, well, a function grabs something as input and
yields something as output. Most of the functions are mathematical and
statistical. Example: genr r = round(x) --- genr is a command, it does something,
whereas round(arg) is a function that returns a rounded-to-zero value of its
argument. Another example: after a regression is estimated, the command vif
calculates variance inflation factors and produces a table with a bunch of numbers,
whereas $rsq is a function: it is equal to the R-squared coefficient from the
last estimated model. A bare function is senseless: one cannot simply write
exp(x) and enjoy the fruits. A function is an instrument that is used in
commands; a command is a script that uses functions. The ols command uses
functions of matrix multiplication, assigns some values to the functions
related to the regression estimation and produces a table. That’s the basic
difference.
Please correct me if I wasn’t precise at all.