comp.lang.ada
 help / color / mirror / Atom feed
* Heeeeeeeeelp!!!!
@ 1996-03-21  0:00 R.A. Lawrence
  1996-03-22  0:00 ` Heeeeeeeeelp!!!! Paul Whittington
  0 siblings, 1 reply; 2+ messages in thread
From: R.A. Lawrence @ 1996-03-21  0:00 UTC (permalink / raw)


Right - a couple of easy peasy questions for you ada gurus out there:

Im rewriting an old program of mine to be used at university. Every Unix
machine has a user id number which can be easily found to which i want to
write a program called `xtwhere` which tells you which lab that computer
with that id number is located.

(1) I want people to be able to type:

xtwhere <machine_id>

to which it runs the program `xtwhere`. How can i find out what the
<machine_id> written was? - an example of this might be

xtwhere xt027

(2) I need to split this <machine_id> into two parts - a text bit (the
`xt`) and the number bit (the '027') - If the answer to (1) returns a
string how can i convert a string into a number?

Please could you mail any suggestions/answers to me as i dont regulary use
this newsgroup.

Regards

Rich.

--

       ___   ___
===   /___\ /___\  ========================================================
     |   o |   o |                                         Richard Lawrence
      \___/ \___/                            Department of Computer Science
         /   \                                  The University of Liverpool
    \___|     |___/         EMAIL: u5ral@csc.liv.ac.uk / cs0u5110@liv.ac.uk
     \   \___/   /                WEB SITE: http://www.csc.liv.ac.uk/~u5ral
===   \_________/ =========================================================




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Heeeeeeeeelp!!!!
  1996-03-21  0:00 Heeeeeeeeelp!!!! R.A. Lawrence
@ 1996-03-22  0:00 ` Paul Whittington
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Whittington @ 1996-03-22  0:00 UTC (permalink / raw)
  To: R.A. Lawrence

One can convert a string into a number by using Ada 95's "'value"
attribute.

  i := integer'value("123");


R.A. Lawrence wrote:
> ... how can i convert a string into a number?




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-03-22  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-03-21  0:00 Heeeeeeeeelp!!!! R.A. Lawrence
1996-03-22  0:00 ` Heeeeeeeeelp!!!! Paul Whittington

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox