WolframLang: Function Doc String

By Xah Lee. Date: . Last updated: .

you can give your function (or any Symbol) a docstring, like this:

add2::usage = "add2[x] returns x plus 2."

When user type ?add2, the usage string will be shown.

The FullForm of

symbol::usage

is

MessageName[ symbol , "usage" ]

MessageName

WolframLang: Define Function

WolframLang in Depth

Basics

Comment, Print

String

Arithmetic

List

Expression, Atom, Head

Boolean

Conditional

Variable

Loop

Data Structure

Function

Pattern Matching

Advanced

Shell Tasks

Misc