# examples -- list the examples in documentation

## Synopsis

• Usage:
examples s
• Inputs:
• s, a descriptor for a documentation node (see below for examples)
• Outputs:
• a net, containing examples of code provided in the documentation of s

## Description

The output is returned as a Net of height 0, so the examples will be displayed indented by just white space, allowing immediate entry. Alternatively, one could use print to display them with no indentation.
 ```i1 : examples "while" --loading the Macaulay2 documentation from /home/dan/src/M2/1.4/Macaulay2/packages/Macaulay2Doc/ o1 = i = 0 ; while i < 10 list i^2 do i = i+1 i = 0 ; while i < 4 do (print i; i = i+1) i = 0 ; while i < 10 list (i = i+1; i^2) i = 0 ; while i < 10 list (i = i+1; if odd i then continue; i^2) i = 0 ; while i < 10 list (i = i+1; if odd i then continue 1234; i^2) i = 0 ; while i < 10 list (i = i+1; if i == 5 then break i; i^2) i = 0 ; while i < 10 list (i = i+1; if i == 5 then break; i^2)``` ```i2 : examples (ideal,Matrix) o2 = R = ZZ/7[w,x,y,z]; f = vars R ideal f g = matrix{{x^2-w*y, x*y-w*z, x*z-y^2},{y^2-x*z,x^2*y-z^2,x^3-y*z}} ideal g``` ```i3 : print oo R = ZZ/7[w,x,y,z]; f = vars R ideal f g = matrix{{x^2-w*y, x*y-w*z, x*z-y^2},{y^2-x*z,x^2*y-z^2,x^3-y*z}} ideal g```