On this page:
number-snip: snip-class%
read
number-snip: make-repeating-decimal-snip
number-snip: make-fraction-snip

22 Number Snip

class

number-snip:snip-class% : class?

  superclass: snip-class%

method

(send a-number-snip:snip-class read f)

  (or/c (is-a?/c snip%) #f)
  f : (is-a?/c editor-stream-in%)
Overrides read in snip-class%.
Constructs a number snip from its input.

procedure

(number-snip:make-repeating-decimal-snip num 
  show-prefix?) 
  (is-a?/c snip%)
  num : number?
  show-prefix? : boolean?
Makes a number snip that shows the decimal expansion for number. The boolean indicates if a #e prefix appears on the number.

procedure

(number-snip:make-fraction-snip num 
  show-prefix-in-decimal-view?) 
  (is-a?/c snip%)
  num : number?
  show-prefix-in-decimal-view? : boolean?
Makes a number snip that shows a fractional view of number. The boolean indicates if a #e prefix appears on the number, when shown in the decimal state.

See also number-snip:make-repeating-decimal-snip.