MathGroup Archive 1989

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Question about Check[]

  • To: mathgroup
  • Subject: Re: Question about Check[]
  • From: stevec at ncsa.uiuc.edu
  • Date: Tue, 2 May 89 09:59:00 CDT

[Fourth in the series on Check and other things. -smc]

Here is a 1.2 session:

Comments?
====================================================================

In[57]:= foo/: CForm[foo[x_,y_]]:= SequenceForm[
        "readdata( foo,", x , ",", y,")"]
         log: SING error

In[58]:= foo[1,2]

Out[58]= foo[1, 2]

In[59]:= CForm[%]

Out[59]= readdata( foo,1,2)

In[60]:= temp = foo[1,2] + foo[2,3] + foo[3,4]

Out[60]= foo[1, 2] + foo[2, 3] + foo[3, 4]

In[61]:= CForm[temp]

Out[61]//CForm= foo(1,2) + foo(2,3) + foo(3,4)

In[62]:= temp /. {foo[x___] -> CForm[foo[x]]}

Out[62]= readdata( foo,1,2) + readdata( foo,2,3) + readdata( foo,3,4)

In[63]:= FullForm[%]

Out[63]//FullForm= 
 
>   Plus[SequenceForm["readdata( foo,", 1, ",", 2, ")"], 
 
>    SequenceForm["readdata( foo,", 2, ",", 3, ")"], 
 
>    SequenceForm["readdata( foo,", 3, ",", 4, ")"]]





  • Prev by Date: Re: Question about Check[]
  • Next by Date: Re: Question about Check[]
  • Previous by thread: Re: Question about Check[]
  • Next by thread: Re: Question about Check[]