o_ls: Listing Objects from the Current Octave Session The function...

Description Usage Arguments Value See Also Examples

Description

Listing Objects from the Current Octave Session

The function o_ls is an enhanced listing function, which also lists user-defined functions, as opposed to o_who or o_whos, which only list variables. Note that this function works properly on Octave >= 3.6.1, but is known not to list user-defined functions on Octave 3.4.1 (for some unknown reason the Octave function completion_matches does not return the names of user-defined functions).

Usage

1
o_ls(long = FALSE, rm.ans = TRUE)

Arguments

long

logical that indicates the desired type of output: if FALSE (default) then only the names of the variables are returned (like dispatched o_who), otherwise a list with more detailed information about each variable is returned (like o_whos.

rm.ans

a logical that indicates if the automatic Octave variable ans should be included in the result. Default (TRUE) is not to include it.

Value

a character vector or a list depending on the value of argument long.

See Also

Other listoct: o_whos, o_who

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# only variables
o_assign(list(a=1, b=2, c=5))
o_ls()
# compare with the output of standard Octave functions
o_who() # should be the same output
o_whos()

# variables and user-defined functions
o_clear(all=TRUE) # first clear Octave session
o_source(system.file('scripts/ex_source.m', package='RcppOctave'))
o_ls()
o_ls(long=TRUE)
# compare with the output of standard Octave functions
o_who()
o_whos()

renozao/RcppOctave documentation built on June 30, 2017, 2:11 p.m.