
1 // 2 // Copyright (c) 2006, Brian Frank and Andy Frank 3 // Licensed under the Academic Free License version 3.0 4 // 5 // History: 6 // 8 Mar 06 Brian Frank Creation 7 // 8 9 ** 10 ** Num is the base class for number class including Int and Float. 11 ** 12 abstract const class Num 13 { 14 15 ////////////////////////////////////////////////////////////////////////// 16 // Constructor 17 ////////////////////////////////////////////////////////////////////////// 18 19 ** 20 ** Protected constructor. 21 ** 22 protected new make() 23 24 ////////////////////////////////////////////////////////////////////////// 25 // Virtuals 26 ////////////////////////////////////////////////////////////////////////// 27 28 ** 29 ** Convert this number to an Int. 30 ** 31 virtual Int toInt() 32 33 ** 34 ** Convert this number to a Float. 35 ** 36 virtual Float toFloat() 37 38 }