Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Function & Format (2)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5105] Function & Format (2)
  • From: F Renard <renard at limeil.cea.fr>
  • Date: Wed, 30 Oct 1996 22:03:59 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks for your answer (See included message below), 
but I'm afraid it's not exactly what I want:

I want the function fun to RETURN, say x^2, but PRINT "-FUN-".
It's like Graphics, that PRINTS "-Graphics-", but RETURNS a more
complicated object, that it's possible to re-use for any other problem:


In[1]:= g = Graphics[...]

Out[1]= -Graphics-

In[2]:= Show[%]

Out[2]= -Graphics-


It's like the difference between InputForm and OutputForm...

Francois RENARD
renard at limeil.cea.fr

------Beginning Included Message----------------------------------------

The function to solve your problem seems to be simple:


 fun[x_]:= ( x^2 >>> "abc";     (* This appends the result x^2 to your
                                   (existing) file  abc. 
                                   (Example for your action)
                                 *)
            "-FUN-"             (* Alternative: Print["-FUN-"]
                                 *)
           )

fun[3]
fun[4]
fun[10]


I hope, it helps

G. Lamprecht
lamprecht at iwd.uni-bremen.de

------End Included Message----------------------------------------



  • Prev by Date: Re: How to specify that a variable is an Integer?
  • Next by Date: Re: List help needed
  • Previous by thread: TrueType TeX fonts
  • Next by thread: About PAUSING in V2.2 on Solaris