+ Reply to Thread
Results 1 to 3 of 3

Thread: How can I accomplish this?

  1. #1
    BertMan Guest

    Default How can I accomplish this?

    How can I store typed data of any length with a break on enter. In other words, if I type:

    DEBUG "TYPE IN A NUMBER AND HIT ENTER"

    How can I capture all numbers typed before the enter key was pressed and store them in a variable?

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    536

    Default

    BertMan, I usually dont use Debug or Hserin in my programs but this is what I have done in the past to solve the same problem. Size an array for the most characters you anticipate being entered then clear the array before use. Use the string ending modifier for Hserin command and make it a carriage return character. That way if the buffer gets filled OR the string modifier is found the entry will be complete. The timeout between charcters is 1 second and if it is exceeded the Hserin command will be aborted. After the array is filled just unload it untill you see a zero and back it up by 1. I hope this helps.....

    POINTER = 0 'clear pointer
    WHILE POINTER < 11 'set for maximum of 12 characters
    INDATA(POINTER) = 0 'clear array
    POINTER = POINTER + 1
    WEND
    HSERIN 1000,EXIT,[STR INDATA\12\13] 'WAIT 1000mS. BETWEEN CHARACTERS

    Dave Purola,
    N8NTA

  3. #3
    BertMan Guest

    Default

    Thanks for the reply. I am still working out other bugs and kindof left this part for later on, but I will use this method when I start making the menu.

+ Reply to Thread

Similar Threads

  1. Any ideas on how to accomplish this?
    By bartman in forum General
    Replies: 18
    Last Post: - 27th January 2007, 00:48

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts