[LON-CAPA-users] CAPA translator

Guy Albertelli II lon-capa-users@mail.lon-capa.org
Mon, 18 Mar 2002 17:51:27 -0500 (EST)


Hi Robert,

>     I think I get it now.  But now I'm curious, why does the <m> tag perform 
> the conversion before the variable evaluation?

All tags do what ever they do before variable evaluation. All tags.
(Except <gnuplot>. I have recently learned it evaluates by default
before doing anything, we are discussing whether this should stay as
it is or not.)

>     I also noticed that the sample problem below has another hidden topic to 
> be explored.  [We've probably discussed this all before, but the answers 
> slip my mind.]  The random function call below only has 2 arguments [which I 
> believe was acceptable in CAPA, but is not in LON-CAPA].  LON-CAPA assumes 
> the third argument to be a zero and hence sites it as an error [illegal 
> division by zero]. 

Yep this was a bug fixed in the latest and greatest version of
default_homework.lcpm

> Is there an easy solution to this, such as adding a 2 as 
> the third argument? [I say 2 instead of 1 due to the limits set forth in the 
> CAPA manual for random(l,u,d) with l+d -> u].  How does CAPA handle the 
> missing third argument?

By assuming 1.

-- 
albertel@msu.edu        BM: n^20 t20 z20 qS 
Guy Albertelli -7-9-8-  O-
    I would love to but . . . I prefer to remain an enigma.