MathGroup Archive 2005

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

Search the Archive

Re: How to create a new Form

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58778] Re: How to create a new Form
  • From: "Nilton" <nilton.volpato at ig.com.br>
  • Date: Mon, 18 Jul 2005 03:21:17 -0400 (EDT)
  • References: <dbd114$2sp$1@smc.vnet.net><dbe3q8$d9r$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks for the answers, but it's not what I want... :(

I know I can use BaseForm to do this (as I told), and I know how to use
format to format expression on any Form that is built-in to Mathematica
(like: CForm, FortranForm, InputForm, StandardForm, etc.). This is what
documentation explain.

What I want to know, is how to create my own "output form". This
BinaryForm is just a simple example, in fact what I want to do is more
complicated (and I tried to simplify the question).

yehuda: I looked at Combinatorica, but found just a formatting rule for
graphs, and not and example of how to create a new output form.

Maybe someone from Wolfram staff could help me?

Thanks,
-- Nilton

Peter Pein wrote:
> Nilton schrieb:
> > I would like to create a new Form that is a "wrapper" (like Short,
> > CForm, ...), which affects printing, but not evaluation. For example:
> >
> > In[1]:= 10 + f[5] // BinaryForm
> >
> > Out[1]//BinaryForm =
> >         1010 + f[101]
> >
> > In[2]:= %
> > Out[2]= 10 + f[5]
> >
> > I know there is BaseForm, but this is just an example. In fact I would
> > like to do something more complicated, but must know how to do
> > something like this first.
> >
> > Can anyone help?
> >
> > Thanks,
> > -- Nilton
> >
>
> Have a look at the documentation (and example) for Format[]: either on
> your hard disk or here:
> http://documents.wolfram.com/mathematica/functions/Format
> 
> -- 
> Peter Pein
> Berlin
> http://people.freenet.de/Peter_Berlin/


  • Prev by Date: Re: Re: Eliminating Annoying Minus Signs
  • Next by Date: Re: Re: Eliminating Annoying Minus Signs
  • Previous by thread: Re: How to create a new Form
  • Next by thread: Re: Re: How to create a new Form