All pastes #581742 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-21 17:53 UTC
rendered paste body
[Description]
  Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])

Reads a #-terminated string of digits a certain number of times from the
user in to the given variable.
  filename   -- file to play before reading digits.
  maxdigits  -- maximum acceptable number of digits. Stops reading after
                maxdigits have been entered (without requiring the user to
                press the '#' key).
                Defaults to 0 - no limit - wait for the user press the '#' key.
                Any value below 0 means the same. Max accepted value is 255.
  option     -- may be 'skip' to return immediately if the line is not up,
                or 'noanswer' to read digits even if the line is not up.
  attempts   -- if greater than 1, that many attempts will be made in the 
                event no data is entered.
  timeout    -- if greater than 0, that value will override the default timeout.

Read should disconnect if the function fails or errors out.