Home  |   Notes  |   Languages  |   Programs  |   Homework

Re: Storing expressions

New Message Reply About this list Date view Thread view Subject view Author view

Stephen Edwards (edwards@CS.VT.EDU)
Sat, 21 Sep 2002 08:49:00 -0400


Message-ID:  <3D8C6ABC.A92EAD80@cs.vt.edu>
Date:         Sat, 21 Sep 2002 08:49:00 -0400
From: Stephen Edwards <edwards@CS.VT.EDU>
Subject:      Re: Storing expressions

> The spec says they are of "arbitrary length", so how
> do we go about this using a static array?

As discussed in class several times, you should use the built-in
"string" type for storing and managing strings. By default, such
strings hold up to 255 characters. You can index into them just
like arrays. Also, as discussed in class, the input lines fed to
your program (the input expressions) will never exceed the length
of the built-in string type.

                                -- Steve

--
Stephen Edwards            604 McBryde Hall          Dept. of Computer Science
e-mail      : edwards@cs.vt.edu           U.S. mail: Virginia Tech (VPI&SU)
office phone: (540)-231-5723                         Blacksburg, VA  24061-0106
-------------------------------------------------------------------------------


New Message Reply About this list Date view Thread view Subject view Author view

Home  |   Notes  |   Languages  |   Programs  |   Homework
copyright © 2001 Virginia Tech, ALL RIGHTS RESERVED
Class site maintained by Stephen H. Edwards <edwards@cs.vt.edu>