lazix

Smalltalk

Nov 19th, 2020
256
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "WIP"
  2. Object subclass: num_of
  3. [
  4.     | nol |
  5.     <comment: "number of lexemes">
  6.    
  7.     set_num: number_set
  8.     [
  9.         set_num := number_set
  10.     ]
  11.     get_num
  12.     [
  13.         ^number_set
  14.     ]
  15.    
  16.     (get_num == 0)
  17.         ifTrue: [^self error: 'Error: NULL' ]
  18.    
  19. ]
  20.  
RAW Paste Data