I can create and run the following code in a compiled file that defines a function if I do an "import Time" operation. However, I'm left wondering how to get the function to compile from the interactive environment within emacs:

  proc {StartPrimeTest N StartTime}
     if {Prime N}
        then {ReportPrime {Time.system} - StartTime}
     end
  end

The error I see is something along the lines of:

   %** illegal feature selection on record
   %**
   %** Feature found:   system
   %** Expected one of: {alarm, delay, repeat, time}
   %** in file "c:/alice/sicp01-emacs.oz", line 506, column 32

What's the proper way to call this function?

As for context, I've basically completed chapter #1 of my translation of SICP into Oz, which can be found on Dominic Fox's CTM website at:

http://www.codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages:Alice_ML

I've a bit of ambition for SICP, in that I'd like to see how far I can get with translating it into various PLs. I've the suspicion though that Scheme's Quote mechanism will be hard in Oz. Is there a meta capability in Oz to dynamically feed code that has local context (something along the lines meta-stage programming)?

Thanks,
Chris Rathman



_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to