Skip to content
Browse files

added details about the use of the GET function

  • Loading branch information...
1 parent be6bee6 commit e95902c6c44cdb09d8269e4d2109e54ddeddfe0b John Doe committed
Showing with 13 additions and 4 deletions.
  1. +13 −4 source/GET_Function.rst
View
17 source/GET_Function.rst
@@ -2,14 +2,23 @@
GET Function
=================
-Material prepared from `M Programming Book`_ [WALTERS1997]_
+Description
+###########
+ **$GET** *(variable, arg2 )*
-Page 149.
+Returns the value within a variable or a constant. If the variable is not defined, $GET returns a default value.
+$GET can be called with one or two arguments.
- $GET
+The first argument is the variable $GET will attempt to obtain information from.
+The second argument, which is optional, sets the value to return if the variable in the first argument is not defined. If the second argument is not set, this argument defaults to "".
-.. _M Programming book: http://books.google.com/books?id=jo8_Mtmp30kC&printsec=frontcover&dq=M+Programming&hl=en&sa=X&ei=2mktT--GHajw0gHnkKWUCw&ved=0CDIQ6AEwAA#v=onepage&q=M%20Programming&f=false
+Examples
+########
+>K SURNAME ; $GET(SURNAME) -> ""
+$GET(SURNAME,"unlisted") -> "unlisted"
+>S SURNAME="Smith" ; $G(SURNAME) -> "Smith"
+$G (SURNAME,"Jackson") -> "Jackson"

0 comments on commit e95902c

Please sign in to comment.
Something went wrong with that request. Please try again.