Method code for $parse_lib.ask()

[Turn off line numbering]
  1: arg question, @rx;
  2: var ans, def;
  3: 
  4: [(rx ?= "(yes|y)"), (def ?= "")] = rx;
  5: ans = (> sender().prompt(question).trim() <);
  6: ans ?= def;
  7: if (ans == "@abort")
  8:     throw(~stop, "** Aborted **");
  9: return match_regexp(ans, rx);

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon