Reading integer from keyboard
Posted: 2 Jan 2015 2:41
I there,
How do I read an integer from the keyboard ?
I want to replace N = 4, by something like N = toInteger(stdio::readLine()),
but I get TaskWindow\TaskWindow.pro(40,14) error c229: Undeclared identifier 'toInteger/1->'
with N = math::toInteger(stdio::readLine()),
I get
I want in the onShow( ) clause of a window to read an integer from the keyboard if possible and show it with stdio::write(N). I can dsiplay data with stdio::write(N) in the windows drawing area no problem. It must not be in the onShow( ) clause I can add a menu item and call some code instead.
Thank you, bye.
How do I read an integer from the keyboard ?
I want to replace N = 4, by something like N = toInteger(stdio::readLine()),
but I get TaskWindow\TaskWindow.pro(40,14) error c229: Undeclared identifier 'toInteger/1->'
with N = math::toInteger(stdio::readLine()),
I get
Code: Select all
Exception: noStream (com/visual-prolog/stream/stream_exception)
The predicate has no stream assigned
Predicate name = stdio::readLine
Thank you, bye.