less(f::AbstractString, ?)

less(file::AbstractString, [line])

Show a file using the default pager, optionally providing a starting line number. Returns to the julia prompt when you quit the pager.

Examples

In the Julia programming language, the less(m::Method, ?) function is used to view the definition of a function using the default pager. It allows you to specify a tuple of types to indicate which method you want to see.

julia> less(rand, (Float64,))

This example will display the definition of the rand function with the method that accepts Float64 as an argument.

julia> less(+, (Int64, Int64))

This example will display the definition of the + function with the method that accepts two Int64 arguments.

Common mistake example:

julia> less(mean, (Array{Int64,1},))
ERROR: MethodError: no method matching mean(::Type{Array{Int64,1}})

In this example, the mistake is providing a type Array{Int64,1} instead of an instance of the array to the mean function. Make sure to provide the correct arguments to the function to avoid such errors.

See Also

abspath, basename, chmod, countlines, cp, ctime, dirname, download, evalfile, expanduser, fdio, filemode, filesize, functionloc, gperm, homedir, include_string, isabspath, isblockdev, ischardev, isdir, isdirpath, isexecutable, isfifo, isfile, islink, ismount, ispath, isreadable, issetgid, issetuid, issticky, iswritable, joinpath, less, lstat, mkdir, mkpath, mktemp, mktempdir, mtime, mv, normpath, operm, poll_fd, poll_file, readall, readcsv, readdir, readdlm, readlines, readlink, realpath, relpath, rm, splitdir, splitdrive, splitext, stat, symlink, tempdir, tempname, touch, truncate, uperm, watch_file, writecsv,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: