Menu

Get A$

Anonymous
2015-06-27
2015-06-27
  • Anonymous

    Anonymous - 2015-06-27

    Hi All, wonder if someone could help me....

    Am back writing basic again after (mumble) years :D

    I want to have a "Press any Key To Continue" function

    Many years ago, I would have just put

    Get a$

    into the code, and the computer (Can't remember if it was PET or BBC I was using) would wait for a key press..... how do I do this in PC BAsic please?

     
  • Rob Hagemans

    Rob Hagemans - 2015-06-27

    Hi, the usual method goes like this:

    100 A$=INKEY$: IF A$="" THEN 100
    

    adapting the line numbers to your needs, of course.
    An alternative is

    A$ = INPUT$(1)
    

    Rob

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.