* how to convert string to float type? @ 2000-11-09 0:00 Hackker Wong 2000-11-09 0:00 ` John English 0 siblings, 1 reply; 2+ messages in thread From: Hackker Wong @ 2000-11-09 0:00 UTC (permalink / raw) hi, 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? thx! -- - By Hackker **************************************************** Mr. Hackker Wong, Y99 Student of Computer Science, The Chinese University of Hong Kong. **************************************************** -The World can't run without computer technicians- ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: how to convert string to float type? 2000-11-09 0:00 how to convert string to float type? Hackker Wong @ 2000-11-09 0:00 ` John English 0 siblings, 0 replies; 2+ messages in thread From: John English @ 2000-11-09 0:00 UTC (permalink / raw) 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 ----------------------------------------------------------------- ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-11-09 0:00 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2000-11-09 0:00 how to convert string to float type? Hackker Wong 2000-11-09 0:00 ` John English
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox