How to get input from simple RUNTIME program?

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

How to get input from simple RUNTIME program?

Postby woody on Sat Mar 09, 2019 1:12 pm

Greetings.

I'm trying some ideas with the RUNTIME option for creating a Dyalog APL .EXE program.

I'm using Dyalog APL v15 (but could use a newer version if needed)

I wanted to try to run a runtime.exe with a simple APL program using the APL console.

However, for some reason ... the keyboard does not work ... and I can not type anything when the program hits the quote-quad input line.

Why would this prevent simple keyboard entry during a runtime.exe?

Code: Select all
∇GO
 'Hello!'
 'What is your name?'
 N←⍞
 'Greetings ',N,'!'
 'How are you today?'
 R←⎕DL 5


Perhaps RUNTIME does not allow input from either ⎕ nor ⍞ ?

Thanks!
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 144
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: How to get input from simple RUNTIME program?

Postby Vince|Dyalog on Tue Mar 12, 2019 4:25 pm

Hi Woody,

I think this is a bug so I have logged it as 16971.

Regards,

Vince
Vince|Dyalog
 
Posts: 413
Joined: Wed Oct 01, 2008 9:39 am

Re: How to get input from simple RUNTIME program?

Postby Vince|Dyalog on Tue Mar 12, 2019 4:26 pm

Hi Woody,

Is there a reason why you cannot use a little GUI program for this?

Regards,

Vince
Vince|Dyalog
 
Posts: 413
Joined: Wed Oct 01, 2008 9:39 am

Re: How to get input from simple RUNTIME program?

Postby woody on Wed Mar 13, 2019 1:53 pm

Thanks for the reply!

I was just exploring that was possible with RUNTIME.exe.
The ⍞ input using console would be easier to teach to "newbies".

Yes... I wrote a GUI version ... but it was tricky for me as a GUI newbie to figure out how to stop and continue APL program flow using the ⎕NQ .. but I got it to work.

Code: Select all
GOAPL
 ⍝ Test of APL program flow with ⎕WC windows input control
 OUTPUT'Hello!'
 OUTPUT'What is your name?'
 N←INPUT
 →(0=⍴_Return)/END
 OUTPUT'Greetings ',N,'!',CR
 OUTPUT'Have a nice day.'
TOP:
 OUTPUT''
 OUTPUT'Please enter some WHOLE numbers ...'
 N←INPUT
 →(~∧/(∆ENLIST N)∊' ',⎕D)/ERR
 →(0=⍴_Return)/END
 N←∆ENLIST N
 N←(N∊' ',⎕D)/N
 OUTPUT'The TOTAL is: ',⍕+/1↓⍎'0 ',∆ENLIST N
 OUTPUT'======= END OF APP ========'
 N←INPUT
 →END
ERR:
 OUTPUT'oooh .. not valid ...'
 OUTPUT'Please try again...'
 →TOP
END:
 'Done'


Cheers
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 144
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest