Suggested fileIn code for repl.slate

Brian T. Rice water at tunes.org
Wed Jul 28 11:57:47 PDT 2004


That's the case. load: is much easier to explain, says what it does, and 
actually has two parameters that can be dispatched upon instead of one - 
string!

Ken Causey wrote:

> I'm sure someone else can reply to this more authoritatively.  But my
> understanding is that fileIn has been deprecated in favor of load:.
> 
> In other words replace
> 
> 'src/collections.slate' fileIn.
> 
> with
> 
> load: 'src/collections.slate'.
> 
> Ken
> 
> 
> On Wed, 2004-07-28 at 10:12, John Leuner wrote:
> 
>>Could you add a fileIn method to repl.slate (as below or something
>>similar)?
>>
>>Index: bootstrap/mobius/repl.slate
>>===================================================================
>>RCS file: /var/lib/cvs/slate/slate/bootstrap/mobius/repl.slate,v
>>retrieving revision 1.8
>>diff -u -r1.8 repl.slate
>>--- bootstrap/mobius/repl.slate 23 Jul 2004 05:14:42 -0000      1.8
>>+++ bootstrap/mobius/repl.slate 28 Jul 2004 15:34:17 -0000
>>@@ -5,6 +5,15 @@
>> REPL addSlot: #lineCount valued: 0.
>> REPL addSlot: #basePrompt valued: '> '.
>> 
>>+s@(String traits) fileIn
>>+[ | input aparser interp p|
>>+" Console ; 'Filing in $'' ; s ; '$'.$\n'."
>>+ input: (File open: s).
>>+ aparser: ((Syntax Parser clone) newOn: (input reader)).
>>+ [ aparser atEnd ] whileFalse: [ p: aparser next. (lobby interpretHook:
>>[ p evaluateIn: lobby ])].
>>+ input close.
>>+].
>>+
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: water.vcf
Type: text/x-vcard
Size: 208 bytes
Desc: not available
Url : /archives/slate/attachments/20040728/72ffea3e/water.vcf


More information about the Slate mailing list