Circle Calculator Help

Alexander alexander at alexandermohn.com
Tue Jun 26 13:39:07 PDT 2012


So, I've taken out the loop part that is "interesting" and 
replaced it with the readln() alternative.
However, I'm still getting what looks like an error.
I managed to take a screenshot of what pops up, and here is what 
it says:

std.conv.ConvException at C:\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(1597):
Unexpected '
' when converting from type char[] to type float
-----------------
C:\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(1597): float 
std.conv.toImpl!(float, char[]).toImpl(char[])
C:\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(245): float 
std.conv.to!(float).to!(char[]).to(char[])
C:\Users\Alexander\Documents\D\circlecalc.d(23): float 
circlecalc.askradius()
C:\Users\Alexander\Documents\D\circlecalc.d(80): _Dmain
-----------------

Does anyone understand this error code?

I believe it means that it isn't letting me convert the user 
input into a floating number in function askradius().

How do I fix this?

(Just a note, the above part is popping up INSTEAD of what is 
supposed to pop up.)

Thanks!



More information about the Digitalmars-d-learn mailing list