Skip to main content

[Migrated content. Thread originally posted on 17 April 2012]

I define a string variable,
01 name         string.
Then, how can I assign it the user input via the Console class' ReadLine method?

invoke type Console::ReadLine(pName)
set pName to Console::Readline()

Neither goes by without compiling errors, despite ReadLine's definition. I must admit lack of knowledge on oo, but the other methods from Console seem to work just fine.

On this regard, is there anywhere I can read descriptions for the different default classes and their methods?

[Migrated content. Thread originally posted on 17 April 2012]

I define a string variable,
01 name         string.
Then, how can I assign it the user input via the Console class' ReadLine method?

invoke type Console::ReadLine(pName)
set pName to Console::Readline()

Neither goes by without compiling errors, despite ReadLine's definition. I must admit lack of knowledge on oo, but the other methods from Console seem to work just fine.

On this regard, is there anywhere I can read descriptions for the different default classes and their methods?
This should work:

set name to type Console::ReadLine()

Passing the string to ReadLine will not work as the ReadLine method doesn't take a parameter (Documentation here: msdn.microsoft.com/.../system.console.aspx) and your other line wouldn't work because of the invoke. I believe that invoke is only needed when you are calling a void method.

[Migrated content. Thread originally posted on 17 April 2012]

I define a string variable,
01 name         string.
Then, how can I assign it the user input via the Console class' ReadLine method?

invoke type Console::ReadLine(pName)
set pName to Console::Readline()

Neither goes by without compiling errors, despite ReadLine's definition. I must admit lack of knowledge on oo, but the other methods from Console seem to work just fine.

On this regard, is there anywhere I can read descriptions for the different default classes and their methods?
The portable solution between .Net and JVM is to use accept/display or exhibit e.g.:

    01 a string.
    accept a
    exhibit named a.

[Migrated content. Thread originally posted on 17 April 2012]

I define a string variable,
01 name         string.
Then, how can I assign it the user input via the Console class' ReadLine method?

invoke type Console::ReadLine(pName)
set pName to Console::Readline()

Neither goes by without compiling errors, despite ReadLine's definition. I must admit lack of knowledge on oo, but the other methods from Console seem to work just fine.

On this regard, is there anywhere I can read descriptions for the different default classes and their methods?
Thanks!

[Migrated content. Thread originally posted on 17 April 2012]

I define a string variable,
01 name         string.
Then, how can I assign it the user input via the Console class' ReadLine method?

invoke type Console::ReadLine(pName)
set pName to Console::Readline()

Neither goes by without compiling errors, despite ReadLine's definition. I must admit lack of knowledge on oo, but the other methods from Console seem to work just fine.

On this regard, is there anywhere I can read descriptions for the different default classes and their methods?
Thanks!

[Migrated content. Thread originally posted on 17 April 2012]

I define a string variable,
01 name         string.
Then, how can I assign it the user input via the Console class' ReadLine method?

invoke type Console::ReadLine(pName)
set pName to Console::Readline()

Neither goes by without compiling errors, despite ReadLine's definition. I must admit lack of knowledge on oo, but the other methods from Console seem to work just fine.

On this regard, is there anywhere I can read descriptions for the different default classes and their methods?
Thanks!