Console INPUT() request

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Console INPUT() request

Post by Rook Zimbabwe »

I have not played with 4.5 but I want to make this request before it is finalized...

Can we change the Console Input() command so that it can display textt as well and have the answer cursor at the end of the line?
as it is now:

PrintN("You wish to quit (Y/N)")
answer$ = Input()

More like

answer$ = Input("You wish to QUIT (Y/N)")

:mrgreen:
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Console INPUT() request

Post by Kaeru Gaman »

just don't use PrintN.

Code: Select all

answer$ = Input("You wish to QUIT (Y/N)")
==>

Code: Select all

Print("You wish to QUIT (Y/N)")
answer$ = Input()
here, especially for you:

Code: Select all

Procedure.s InputO ( Text$ )
  Protected answer$
  Print( Text$ )
  answer$ = Input()
  ProcedureReturn answer$
EndProcedure

Macro Input( _PARAMETER_ )
  InputO( _PARAMETER_ )
EndMacro
oh... and have a nice day.
Post Reply