Simple Console Example for new users.

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Simple Console Example for new users.

Jason Monroe Martin
I have admired the NetRexx for years. To have so few bugs in such a long
time is a great achievement.
Now that it open source, I hope that continues. You can post the example
on the website if you want. Some of us are still using old low memory
machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

ThSITC
Hello Jason,
    thanks for your sample. :-)

Didn't even know about System.Console, but as laready stated, my actual
Java knowledge is quite small :-(

Such helpful examples like your's will improve that, of course.
Thanks again,
Thomas.
=========================================================
Am 28.06.2011 06:48, schrieb Jason Monroe Martin:

> I have admired the NetRexx for years. To have so few bugs in such a
> long time is a great achievement.
> Now that it open source, I hope that continues. You can post the
> example on the website if you want. Some of us are still using old low
> memory machines.
>
>
>
> /* A sample text based program, written in NetRexx */
>
> /* Read some data from a console because I still code text based
> programs.
>
> This uses the Class Console from java.io.
>
> Tested on linux using openjdk-6.
>
> Note : No import statement was necessary.
>
> Netrexx imports the following by default and more (Read docs).
> netrexx.lang.
> java.lang.
> java.io.
> java.util.
> java.net.
> java.awt.
> java.applet.*/
>
>
> con = System.console()
>
> say 'Enter Something :'
>
> data = con.readLine()
>
> say 'You entered :'
>
> say data
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
>


--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Fernando Cassia-2
In reply to this post by Jason Monroe Martin
On Tue, Jun 28, 2011 at 01:48, Jason Monroe Martin
<[hidden email]> wrote:
> I have admired the NetRexx for years. To have so few bugs in such a long
> time is a great achievement.
> Now that it open source, I hope that continues. You can post the example on
> the website if you want. Some of us are still using old low memory machines.

Thanks a lot Jason.

One suggestion: could you (or could I) repackage it into a zip file
with a filename like NRexx-console-snippet.zip containing the file
"console-example.nrx" ?.

It´d be great if the NetRexx project at Kenai could include a "Code
Snippets" folder where users could upload their own samples.

Like, for instance, the e-mail sample someone posted a few weeks ago
to this list.

Well, just an idea. Thanks again.
FC

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Fernando Cassia-2
On Tue, Jun 28, 2011 at 08:05, Fernando Cassia <[hidden email]> wrote:
>
> Like, for instance, the e-mail sample someone posted a few weeks ago
> to this list.
>
> Well, just an idea. Thanks again.

It would also be of use if it includes a "license.txt" claiming that
the included code snippet is in the public domain allowing for its
re-use.

FC
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Robert L Hamilton
In reply to this post by Jason Monroe Martin
On jEdit w/ NETREXXDE plugin (Windows XP SP3), this chokes on

data = con.readLine()

BobH
Richardson Texas USA



On Mon, Jun 27, 2011 at 11:48 PM, Jason Monroe Martin <[hidden email]> wrote:
I have admired the NetRexx for years. To have so few bugs in such a long time is a great achievement.
Now that it open source, I hope that continues. You can post the example on the website if you want. Some of us are still using old low memory machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

RE: Simple Console Example for new users.

measel

<STICKY> NETREXXDE plugin issues don’t go here.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Robert Hamilton
Sent: Tuesday, June 28, 2011 8:21 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Simple Console Example for new users.

 

On jEdit w/ NETREXXDE plugin (Windows XP SP3), this chokes on

data = con.readLine()

BobH
Richardson Texas USA


On Mon, Jun 27, 2011 at 11:48 PM, Jason Monroe Martin <[hidden email]> wrote:

I have admired the NetRexx for years. To have so few bugs in such a long time is a great achievement.
Now that it open source, I hope that continues. You can post the example on the website if you want. Some of us are still using old low memory machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users. (Errors)

Jason Monroe Martin
In reply to this post by Robert L Hamilton
1) con = System.console() probably returned null since it is running in a gui. No error checking coded.
2) I did everything from a term window.
3) There are some other Java Curses libraries out there on the net also.
4) Not sure when and which version of java the Class Console was added. (See your docs for your java version)

It was late and I was tired. I will clean it up (add error checking) and add a license when I get time.


On 06/28/2011 09:21 AM, Robert Hamilton wrote:
On jEdit w/ NETREXXDE plugin (Windows XP SP3), this chokes on

data = con.readLine()

BobH
Richardson Texas USA



On Mon, Jun 27, 2011 at 11:48 PM, Jason Monroe Martin <[hidden email]> wrote:
I have admired the NetRexx for years. To have so few bugs in such a long time is a great achievement.
Now that it open source, I hope that continues. You can post the example on the website if you want. Some of us are still using old low memory machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

ThSITC
In reply to this post by measel
Hello Mike, & all,

   where then, when NOT at ibm-netRexx, should NetRexxDE plugin issues go then ?
Thomas.
===========================================================
Am 28.06.2011 16:52, schrieb Measel, Mike:

<STICKY> NETREXXDE plugin issues don’t go here.

 

From: [hidden email] [[hidden email]] On Behalf Of Robert Hamilton
Sent: Tuesday, June 28, 2011 8:21 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Simple Console Example for new users.

 

On jEdit w/ NETREXXDE plugin (Windows XP SP3), this chokes on

data = con.readLine()

BobH
Richardson Texas USA


On Mon, Jun 27, 2011 at 11:48 PM, Jason Monroe Martin <[hidden email]> wrote:

I have admired the NetRexx for years. To have so few bugs in such a long time is a great achievement.
Now that it open source, I hope that continues. You can post the example on the website if you want. Some of us are still using old low memory machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

 

_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


--
Thomas Schneider (www.thsitc.com)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Kermit Kiser
Thomas is right. If we can't discuss NetRexx utilities on the only NetRexx list, where would we do so?

-- Kermit

On 6/28/2011 11:26 AM, Thomas Schneider wrote:
Hello Mike, & all,

   where then, when NOT at ibm-netRexx, should NetRexxDE plugin issues go then ?
Thomas.
===========================================================
Am 28.06.2011 16:52, schrieb Measel, Mike:

<STICKY> NETREXXDE plugin issues don’t go here.

 

From: [hidden email] [[hidden email]] On Behalf Of Robert Hamilton
Sent: Tuesday, June 28, 2011 8:21 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Simple Console Example for new users.

 

On jEdit w/ NETREXXDE plugin (Windows XP SP3), this chokes on

data = con.readLine()

BobH
Richardson Texas USA


On Mon, Jun 27, 2011 at 11:48 PM, Jason Monroe Martin <[hidden email]> wrote:

I have admired the NetRexx for years. To have so few bugs in such a long time is a great achievement.
Now that it open source, I hope that continues. You can post the example on the website if you want. Some of us are still using old low memory machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

 

_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


--
Thomas Schneider (www.thsitc.com)
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Kermit Kiser
In reply to this post by Jason Monroe Martin
Can I ask why you are doing this? It does not seem like the NetRexx way of doing things. Unless I am missing something, would it not be the same thing as this?:

say 'Enter Something :'



data=ask

say 'You entered :'

say data

The System.console approach does not work in some environments like jEdit.

-- Kermit


On 6/27/2011 9:48 PM, Jason Monroe Martin wrote:
I have admired the NetRexx for years. To have so few bugs in such a long time is a great achievement.
Now that it open source, I hope that continues. You can post the example on the website if you want. Some of us are still using old low memory machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

RE: Simple Console Example for new users.

measel
In reply to this post by Kermit Kiser

I think it should be discussed elsewhere because it is a plugin for Jedit that happens to be written in NetRexx.

 

There’s plenty of spam generated by this list already.  I don’t think it’s too much to ask for you and Bob to take it offline.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Kermit Kiser
Sent: Tuesday, June 28, 2011 4:03 PM
To: [hidden email]; IBM Netrexx
Subject: Re: [Ibm-netrexx] Simple Console Example for new users.

 

Thomas is right. If we can't discuss NetRexx utilities on the only NetRexx list, where would we do so?

-- Kermit

On 6/28/2011 11:26 AM, Thomas Schneider wrote:

Hello Mike, & all,

   where then, when NOT at ibm-netRexx, should NetRexxDE plugin issues go then ?
Thomas.
===========================================================
Am 28.06.2011 16:52, schrieb Measel, Mike:

<STICKY> NETREXXDE plugin issues don’t go here.

 

From: [hidden email] [[hidden email]] On Behalf Of Robert Hamilton
Sent: Tuesday, June 28, 2011 8:21 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Simple Console Example for new users.

 

On jEdit w/ NETREXXDE plugin (Windows XP SP3), this chokes on

data = con.readLine()

BobH
Richardson Texas USA



On Mon, Jun 27, 2011 at 11:48 PM, Jason Monroe Martin <[hidden email]> wrote:

I have admired the NetRexx for years. To have so few bugs in such a long time is a great achievement.
Now that it open source, I hope that continues. You can post the example on the website if you want. Some of us are still using old low memory machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

 

 
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
 

 

--
Thomas Schneider (www.thsitc.com)

 
 
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
 

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Fernando Cassia-2
On Tue, Jun 28, 2011 at 18:36, Measel, Mike <[hidden email]> wrote:
> There’s plenty of spam generated by this list already.  I don’t think it’s
> too much to ask for you and Bob to take it offline.

Spam? Really?.

FC

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Kermit Kiser
In reply to this post by measel
I guess we are going to disagree then. In spite of what you think it is, NetRexxDE is a utility that makes compiling and testing simple NetRexx programs much easier than using the command line. I use it all of the time. It also just happens to be a plugin that runs under jEdit. It could be made into a standalone NetRexx IDE, but that would be a pointless loss of functionality.

Subjects related to NetRexx programming are NOT spam.

I think it should be discussed elsewhere because it is a plugin for Jedit that happens to be written in NetRexx.

 

There’s plenty of spam generated by this list already.  I don’t think it’s too much to ask for you and Bob to take it offline.

 

From: [hidden email] [[hidden email]] On Behalf Of Kermit Kiser
Sent: Tuesday, June 28, 2011 4:03 PM
To: [hidden email]; IBM Netrexx
Subject: Re: [Ibm-netrexx] Simple Console Example for new users.

 

Thomas is right. If we can't discuss NetRexx utilities on the only NetRexx list, where would we do so?

-- Kermit

On 6/28/2011 11:26 AM, Thomas Schneider wrote:

Hello Mike, & all,

   where then, when NOT at ibm-netRexx, should NetRexxDE plugin issues go then ?
Thomas.
===========================================================
Am 28.06.2011 16:52, schrieb Measel, Mike:

<STICKY> NETREXXDE plugin issues don’t go here.

 

From: [hidden email] [[hidden email]] On Behalf Of Robert Hamilton
Sent: Tuesday, June 28, 2011 8:21 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Simple Console Example for new users.

 

On jEdit w/ NETREXXDE plugin (Windows XP SP3), this chokes on

data = con.readLine()

BobH
Richardson Texas USA



On Mon, Jun 27, 2011 at 11:48 PM, Jason Monroe Martin <[hidden email]> wrote:

I have admired the NetRexx for years. To have so few bugs in such a long time is a great achievement.
Now that it open source, I hope that continues. You can post the example on the website if you want. Some of us are still using old low memory machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

 

 
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
 

 

--
Thomas Schneider (www.thsitc.com)

 
 
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
 
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Patric Bechtel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I agree with Kermit. Issues with NetRexxDE are user issues with one
possible, entry user frontend. And I strongly hope for more of these for
NetBeans, Eclipse, Idea and others. The more the better.
I don't use any of these, but I know that most developers *love* them.
Especially the younger ones, as they got used to them right from the start.
We should be thankful there's at least one graphical 'IDE' (if you call
jEdit as one) plugin for NetRexx. So let's treat it with respect and the
problems of noobs with patience.

There might be spam on this list, but it's probably not coming from
NetRexxDE and the noobs. No pun intended. Not.

Kermit Kiser schrieb am 29.06.2011 00:06:
> I guess we are going to disagree then. In spite of what you think it is,
> NetRexxDE is a utility that makes compiling and testing simple NetRexx
> programs much easier than using the command line. I use it all of the
> time. It also just happens to be a plugin that runs under jEdit. It
> could be made into a standalone NetRexx IDE, but that would be a
> pointless loss of functionality.
>
> Subjects related to NetRexx programming are NOT spam.

- --
cu, Patric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: GnuPT 2.5.2

iEYEARECAAYFAk4KVe0ACgkQfGgGu8y7ypD9wQCfQhXzYF6gXwccigcAyD1ykExb
hU4AniKy3RP7oWEhwsrkRpW00YXrGZph
=0fBb
-----END PGP SIGNATURE-----
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

measel
In reply to this post by Jason Monroe Martin
Re: [Ibm-netrexx] Simple Console Example for new users.

Unsubscribe
------Original Message------
From: Kermit Kiser
To: IBM Netrexx
ReplyTo: IBM Netrexx
Subject: Re: [Ibm-netrexx] Simple Console Example for new users.
Sent: Jun 28, 2011 5:06 PM

I guess we are going to disagree then. In spite of what you think it is, NetRexxDE is a utility that makes compiling and testing simple NetRexx programs much easier than using the command line. I use it all of the time. It also just happens to be a plugin that runs under jEdit. It could be made into a standalone NetRexx IDE, but that would be a pointless loss of functionality. Subjects related to NetRexx programming are NOT spam. I think it should be discussed elsewhere because it is a plugin for Jedit that happens to be written in NetRexx.
 
There’s plenty of spam generated by this list already.  I don’t think it’s too much to ask for you and Bob to take it offline.
 
From: [hidden email] [[hidden email]] On Behalf Of Kermit Kiser Sent: Tuesday, June 28, 2011 4:03 PM To: [hidden email]; IBM Netrexx Subject: Re: [Ibm-netrexx] Simple Console Example for new users.
 
Thomas is right. If we can't discuss NetRexx utilities on the only NetRexx list, where would we do so? -- Kermit On 6/28/2011 11:26 AM, Thomas Schneider wrote:
Hello Mike, & all,    where then, when NOT at ibm-netRexx, should NetRexxDE plugin issues go then ? Thomas. =========================================================== Am 28.06.2011 16:52, schrieb Measel, Mike:
<STICKY> NETREXXDE plugin issues don’t go here.
 
From: [hidden email] [[hidden email]] On Behalf Of Robert Hamilton Sent: Tuesday, June 28, 2011 8:21


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Jason Monroe Martin
In reply to this post by Kermit Kiser
You're are right but I started out playing with curses based libraries. Much simpler but I was looking for ways to create text based menus and widgets like CHARVA at http://www.pitman.co.za/projects/charva/index.html and java curses http://sourceforge.net/projects/javacurses/ when I stumbled onto the console class added to Java in 1.6


On 06/28/2011 05:12 PM, Kermit Kiser wrote:
Can I ask why you are doing this? It does not seem like the NetRexx way of doing things. Unless I am missing something, would it not be the same thing as this?:

say 'Enter Something :'



data=ask

say 'You entered :'

say data

The System.console approach does not work in some environments like jEdit.

-- Kermit


On 6/27/2011 9:48 PM, Jason Monroe Martin wrote:
I have admired the NetRexx for years. To have so few bugs in such a long time is a great achievement.
Now that it open source, I hope that continues. You can post the example on the website if you want. Some of us are still using old low memory machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Tom Maynard
In reply to this post by measel


"Measel, Mike" <[hidden email]> wrote:

>Unsubscribe
>
LOL.  That's hilarious.  "Let's you and him fight!" As we used to say in Texas.  I don't care one whit one way or the other.  This is an unmoderated list and you gets what you pays for.

And now who's burning bandwidth?  Why, ME!  Good GAWD.  I'm usually the last one to feed a troll, but, "Here, have a cookie.  They're good for you."

Tom.
Sent from my Motorola ATRIX™ 4G on AT&T
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

Fernando Cassia-2
On Tue, Jun 28, 2011 at 20:11, Tom Maynard <[hidden email]> wrote:
> "Measel, Mike" <[hidden email]> wrote:
>
>>Unsubscribe
>>
> LOL.  That's hilarious.

I didn´t notice his domain name.

Reminds me of a certain failed CEO
http://en.wikipedia.org/wiki/Sanjay_Kumar

FC

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

ThSITC
In reply to this post by Kermit Kiser
Yust to add my 2 cents:

RexxMsg, part of org.netrexxruntime.compatibility to be delivered with vs. 3.01, has, by design, a static method (function) called askfor.

therefore, you could code:

import org.netrexx.runtime.compatibility.

class my class USES RexxMsg

data=askfor('Enter something:')
   - or - , even more convenient
 
answer=askfor('Would you like to continue','Yes/No')

Please note, that the latter case also allows abbreviated input ('Y' for 'Yes', and 'N' for 'No').

One of the advantages using this function is that all questions (and answers)
are also recorded in the (optional) LOG-File supported by RexxMsg.

The current documentation is in www.thsitc.com/Rexx2Nrx, section run-time.

I'm currently deploying all those run-time classes, which also do implement
things like linein, lineout, date, time, etc (in the classic Rexx sense)
to org.netrexx (including the sources, written in NetRexx, of course, for free :-)) for possible inclusion in further NetRexx distributions.

Kind regards from sunny Vienna, Austria,

Thomas.
===========================================================

Am 28.06.2011 23:12, schrieb Kermit Kiser:
Can I ask why you are doing this? It does not seem like the NetRexx way of doing things. Unless I am missing something, would it not be the same thing as this?:

say 'Enter Something :'



data=ask

say 'You entered :'

say data

The System.console approach does not work in some environments like jEdit.

-- Kermit


On 6/27/2011 9:48 PM, Jason Monroe Martin wrote:
I have admired the NetRexx for years. To have so few bugs in such a long time is a great achievement.
Now that it open source, I hope that continues. You can post the example on the website if you want. Some of us are still using old low memory machines.



/* A sample text based program, written in NetRexx */

/* Read some data from a console because I still code text based programs.

This uses the Class Console from java.io.

Tested on linux using openjdk-6.

Note : No import statement was necessary.

Netrexx imports the following by default and more (Read docs).
netrexx.lang.
java.lang.
java.io.
java.util.
java.net.
java.awt.
java.applet.*/


con = System.console()

say 'Enter Something :'

data = con.readLine()

say 'You entered :'

say data
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


--
Thomas Schneider (www.thsitc.com)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: Simple Console Example for new users.

David Requena
In reply to this post by Patric Bechtel
Mike,

I might be seen as an interested party in this discussion so probably I won't be replying on-list to any reactions to this email. I might off list or o the advocacy list.

Just want to point out the fact that this list actually went with virtually no traffic for years. At some point someone asked for an updated NetRexxJe that worked with the, at the time, current jEdit version. I released what I had at the moment and there was a furry of related list traffic which somewhat seemed so set the ball rolling again (if only to start bickering big blue for not delivering on nits promises...)

Note that these're not my views; the archives are at Nabble, go check them.

Now I wonder... where was King Measel the First at the time with his non-spam emails and his rulings about what goes in the list and what not?

C'mon, this has always been an open list. We've endured relentless advertising with admirable patience. We're still here after the many years of neglection and uncertainty. Are we really going to start the pettiness competition now? I for one will keep trying to help any fellow NetRexxer on any platform and or environment.


2011/6/29 Patric Bechtel <[hidden email]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I agree with Kermit. Issues with NetRexxDE are user issues with one
possible, entry user frontend. And I strongly hope for more of these for
NetBeans, Eclipse, Idea and others. The more the better.
I don't use any of these, but I know that most developers *love* them.
Especially the younger ones, as they got used to them right from the start.
We should be thankful there's at least one graphical 'IDE' (if you call
jEdit as one) plugin for NetRexx. So let's treat it with respect and the
problems of noobs with patience.

There might be spam on this list, but it's probably not coming from
NetRexxDE and the noobs. No pun intended. Not.

Kermit Kiser schrieb am 29.06.2011 00:06:
> I guess we are going to disagree then. In spite of what you think it is,
> NetRexxDE is a utility that makes compiling and testing simple NetRexx
> programs much easier than using the command line. I use it all of the
> time. It also just happens to be a plugin that runs under jEdit. It
> could be made into a standalone NetRexx IDE, but that would be a
> pointless loss of functionality.
>
> Subjects related to NetRexx programming are NOT spam.

- --
cu, Patric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: GnuPT 2.5.2

iEYEARECAAYFAk4KVe0ACgkQfGgGu8y7ypD9wQCfQhXzYF6gXwccigcAyD1ykExb
hU4AniKy3RP7oWEhwsrkRpW00YXrGZph
=0fBb
-----END PGP SIGNATURE-----
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




--
Saludos / Regards,
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

12