Method code for $parse_lib._range()

[Turn on line numbering]
arg str;

if (str.is_numeric()) {
    return toint(str);
} else {
    switch (str) {
        case "$", "last", "end":
            return 'end;
        case ".", "here":
            return 'current;
        case "^", "start":
            return 'start;
        default:
            throw(~range, "Invalid range reference.");
    }
}

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

Tlon