bcaf4e5e1e
changed to use & as a string concatenation method in the string class. added some code to support variadic arguments
82 lines
1.2 KiB
Smalltalk
82 lines
1.2 KiB
Smalltalk
#class(#byte) Stdio(Object) from 'stdio'
|
|
{
|
|
(*
|
|
* The following methods are generated by the module.
|
|
* #method(#class) _newInstSize { <primitive: #stdio._newInstSize> }
|
|
* #method open: name for: mode { <primitive: #stdio.open> }
|
|
* #method close { <primitive: #stdio.close> }
|
|
*)
|
|
|
|
#method(#class) new: size
|
|
{
|
|
##self prohibited
|
|
##raise exception. prohibited...
|
|
^(super new: (self _newInstSize))
|
|
}
|
|
|
|
#method(#class) new
|
|
{
|
|
##self prohibited
|
|
##raise exception. prohibited...
|
|
^(super new: (self _newInstSize))
|
|
}
|
|
|
|
#method(#class) open: name for: mode
|
|
{
|
|
^(self new) open: name for: mode
|
|
}
|
|
|
|
|
|
(* ---------------------
|
|
#method(#class) input
|
|
{
|
|
^(super new) open: 0 for: 'r'
|
|
}
|
|
|
|
#method(#class) output
|
|
{
|
|
^(super new) open: 1 for: 'w'
|
|
}
|
|
|
|
#method(#class) error
|
|
{
|
|
^(super new) open: 2 for: 'w'
|
|
}
|
|
------------------------ *)
|
|
|
|
(*
|
|
#method format: fmt with: ...
|
|
{
|
|
|
|
}
|
|
*)
|
|
|
|
#method format (fmt, args)
|
|
{
|
|
| a b c |
|
|
'THIS IS FORMAT' dump.
|
|
fmt dump.
|
|
args dump.
|
|
thisContext temporaryCount dump.
|
|
}
|
|
}
|
|
|
|
#extend Stdio
|
|
{
|
|
#method xxxx
|
|
{
|
|
self basicSize dump.
|
|
}
|
|
}
|
|
|
|
#class(#byte) Stdio2(Stdio)
|
|
{
|
|
#method(#class) new
|
|
{
|
|
##self prohibited
|
|
##raise exception. prohibited...
|
|
^(super new).
|
|
}
|
|
|
|
}
|