Changeset 2019 for cobra/trunk/Samples/forth.cobra
- Timestamp:
- 04/16/09 22:18:35 (3 years ago)
- Files:
-
- 1 modified
-
cobra/trunk/Samples/forth.cobra (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Samples/forth.cobra
r1982 r2019 146 146 methodName = word.toString['built-in:'.length:] 147 147 methodName = methodName[0].toString.toUpper + methodName[1:] # because at run-time, method names are capped for compatibility with C# and VB 148 method = . getType.getMethod(methodName)148 method = .typeOf.getMethod(methodName) 149 149 method.invoke(this, nil) 150 150 else … … 396 396 branch _which 397 397 on WordType.String 398 if _s == '' 399 return '(EMPTY-STRING)' 400 if _s.trim == '' 401 return '(BLANK-STRING)' 398 if _s == '', return '(EMPTY-STRING)' 399 if _s.trim == '', return '(BLANK-STRING)' 402 400 return _s to ! 403 401 on WordType.Int … … 407 405 def toTechString as String 408 406 branch _which 409 on WordType.String, return '[. getType.name](string, "[_s]")'410 on WordType.Int, return '[. getType.name](int, "[_i]")'407 on WordType.String, return '[.typeOf.name](string, "[_s]")' 408 on WordType.Int, return '[.typeOf.name](int, "[_i]")' 411 409 throw FallThroughException(_which) 412 410



