[Turn off line numbering]1: arg str; 2: 3: if (str.is_numeric()) { 4: return toint(str); 5: } else { 6: switch (str) { 7: case "$", "last", "end": 8: return 'end; 9: case ".", "here": 10: return 'current; 11: case "^", "start": 12: return 'start; 13: default: 14: throw(~range, "Invalid range reference."); 15: } 16: }
// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit