Re: Need translation from QBasic to EUPHRIA... Please.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Dr. Science wrote:
> 
> Hi friends I'm a newby, in the past I was able to code a litle with QBasic.
> 
> I have bought a relay board that can be programed with any language that can
> send bits to the parallel port. This is quite simple in QBasic:
> 
> DO
>   CLS
>   LOCATE 22,20:PRINT "CTRL+PAUSE TO EXIT"
>   LOCATE 10,20
>   INPUT "OUTS BINRY:",X
>   LPRINT CHR$(X);
> LOOP
> END
> 
> This piece of code should ask for bits to send then to the parallel port.
> 
> Answering...
> 
> 0 : disconnects all relays
> 1 : connects relay 1
> 2 : connects relay 2
> 11: connects relay 1 and 2 and so on...
> 
> Is it posible to translate this to Euphoria?
> 
> I'm quite new to programming and I would like to begin whith this language.
> I've read all documentation and have Googled for a long time but no luck!
> 
> Anybody helps?
> 
> 
> PS: First time I had news from Euphoria was 10 years ago, I'm very impressed
> to see that it is still in development, mantained, and all contributions it
> has... almost all "hi level" or "Basic" languages I've been interested in 
> had been abandoned... that's the reason I want to learn Euphoria.
> 
> Thank you.
> 

F  the first part:
clear_screen()
 position(22,20)
 puts(1,"Hit ANY KEY to EXIT/n")
 while 1 do
 position(10,20)
 x=gets(OUTS_BINARY)
 puts(1,sprintf("%s",{x}))
  if=get_key() then
    exit
  end if
end while

Second part I would have to study awhile.
Maybe someone else that knows more  ports could help.

I hope this can get you started.

Don Cole
SF

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu