From: John English <je@bton.ac.uk>
Subject: Re: how to convert string to float type?
Date: 2000/11/09
Date: 2000-11-09T11:36:13+00:00 [thread overview]
Message-ID: <3A0A8C15.41F7B9C7@bton.ac.uk> (raw)
In-Reply-To: 3A0A754B.5275EC0@cse.cuhk.edu.hk
Hackker Wong wrote:
> i am doing a calculator homework. i use get() in text_io to read the
> whole expression including (+, -, *, /, numbers) in string format. but i
> have a problem in converting sub-string to float type. would anyone help
> me?
Two possibilities suggest themselves:
1) use the 'Value attribute (RM95 Annex K, available online at
http://burks.bton.ac.uk/burks/language/ada/lrm95/k.htm, paras
264-267)
2) use some of the facilities defined in Ada.Float_Text_IO (see
http://burks.bton.ac.uk/burks/language/ada/lrm95/a_10_09.htm).
-----------------------------------------------------------------
John English | mailto:je@brighton.ac.uk
Senior Lecturer | http://www.it.bton.ac.uk/staff/je
Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS **
University of Brighton | -- see http://burks.bton.ac.uk
-----------------------------------------------------------------
prev parent reply other threads:[~2000-11-09 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-09 0:00 how to convert string to float type? Hackker Wong
2000-11-09 0:00 ` John English [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox