One of the key concepts in SNOBOL was that its functions returned the "success" or "failure" as primitives of the language rather than using magic numbers or other techniques. For instance, a function that returns the position of a substring within another string is a common routine found in most language runtime systems; in JavaScript one might want to find the position of the word "World" within "Hello, World!", which would be accomplished with , which would return 7. If one instead asks for the the code will "fail", as the search term does not appear in the string. In JavaScript, as in most languages, this will be indicated by returning a magic number, in this case -1.
