Use the function to get keyboard input

8 views
Skip to first unread message

Federico Radaelli

unread,
Apr 23, 2024, 10:37:02 AMApr 23
to sarl
Hello everybody I hope that someone can help me out.

I have a bit of treble because the function: var r = occurrence.parameters.get(0) as Double

it doesn't sims to work with me. I have tried to add the argument in both; boot agent and SRE but the result is the the data arriving at the program is always a 0.

If i don't add the arguments the result is big mess of errors (imagine attached)

Thanks in advance to anyone that can help me :)Screenshot 2024-04-23 163400.png

Federico Radaelli

unread,
Apr 23, 2024, 11:35:30 AMApr 23
to sarl
Okay, i have resolved it with a little trick. I have used "var scanner = new Scanner(System.in)"

and called on r the function "var r = scanner.nextDouble()"

Stéphane Galland

unread,
May 21, 2024, 7:54:50 AMMay 21
to sarl
Hello.
Sorry for the delay of my answer. Your email was in my spams.

The key point is the method used for passing the string value on the program command line. If you could be more explicit on this point, I could manage to find the source of the problem.

Stéphane.
Reply all
Reply to author
Forward
0 new messages