Index: /trunk/Ohana/src/opihi/cmd.basic/init.c
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/init.c	(revision 41159)
+++ /trunk/Ohana/src/opihi/cmd.basic/init.c	(revision 41160)
@@ -73,4 +73,6 @@
   {1, "??",            list_vars,          "list variables *"},
   {1, "#",             nop,                "a NOP function"},
+  {1, "##",            nop,                "a NOP function"},
+  {1, "###",           nop,                "a NOP function"},
   {1, "local",         local,              "define local variables"},
   {1, "macro",         macro,              "deal with the macros *"}, 
Index: /trunk/Ohana/src/opihi/cmd.basic/memory.c
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/memory.c	(revision 41159)
+++ /trunk/Ohana/src/opihi/cmd.basic/memory.c	(revision 41160)
@@ -5,4 +5,11 @@
   
   if (argc < 2) goto usage;
+
+  if (!strcasecmp (argv[1], "max-lines")) {
+    if (argc != 3) goto usage;
+    int MaxLines = atoi(argv[2]);
+    ohana_memdump_set_maxlines (MaxLines);
+    return TRUE;
+  }
 
   if (!strcasecmp (argv[1], "all")) {
@@ -43,6 +50,13 @@
   }
 
+  if (!strncasecmp ("strings", argv[1], strlen(argv[1]))) {
+    ohana_memdump_strings_file (stderr, FALSE);
+    return (TRUE);
+  }
+
 usage:
-  gprint (GP_ERR, "USAGE: memory (all/leaks)\n");
+  gprint (GP_ERR, "USAGE: memory (mode) [-max-lines]\n");
+  gprint (GP_ERR, "USAGE: memory (max-lines) (N)\n");
+  gprint (GP_ERR, " mode options: all, leaks, check, checkfree, variables, vectors, buffers, macros, commands, strings\n");
   return (FALSE);
 }
Index: /trunk/Ohana/src/opihi/cmd.basic/test/if.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/if.sh	(revision 41159)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/if.sh	(revision 41160)
@@ -320,2 +320,82 @@
  end
 end
+
+# check memleaks
+macro memtest1
+
+ local a b i N
+
+ $i = 0
+ $a = 1
+
+ memory check
+ output /dev/null 
+ for i 0 1000
+   if ($a == 1)
+    echo "run"    
+   end
+ end    
+ output stdout
+ memory check
+end
+
+# check memleaks
+macro memtest2
+
+ local a b i N
+
+ $i = 0
+ $a = 1
+ $b = 2
+
+ memory check
+ output /dev/null
+ for i 0 1000
+   if (($a == 1) && ($b == 2))
+    echo "run"    
+   end
+ end    
+ output stdout
+ memory check
+end
+
+# memory test using continue
+macro memtest3
+
+ local a b i N
+
+ $i = 0
+ $a = 1
+ $b = 2
+
+ memory check
+ output /dev/null
+ for i 0 1000
+   if (($a == 1) && ($b == 2))
+    continue
+    echo "run"    
+   end
+ end    
+ output stdout
+ memory check
+end
+
+# memory test using continue
+macro memtest4
+
+ local a b i N bool
+
+
+ $i = 0
+ $a = 1
+ $b = 2
+ $bool = 0
+
+ memory check
+ output /dev/null
+ for i 0 1000
+   $bool = (($a == 1) && ($b == 2))
+ end    
+ output stdout
+ memory check
+end
Index: /trunk/Ohana/src/opihi/cmd.basic/test/macro.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/macro.sh	(revision 41159)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/macro.sh	(revision 41160)
@@ -7,4 +7,13 @@
 # Is the macro working?
 macro test_prep
+ $test_var1 = check1
+ $test_var2 = check2
+ $var_count = $0
+end
+
+# Is the macro working?
+macro test_local
+ local test_var test_var2 var_count
+
  $test_var1 = check1
  $test_var2 = check2
@@ -47,2 +56,30 @@
  end
 end
+
+# Memory Test for macro
+macro memtest2
+
+ $i = 0
+ test_prep
+
+ memory check
+ for i 0 10000
+  test_prep
+ end    
+ memory check
+  
+end
+
+# Memory Test for macro
+macro memtest3
+
+ $i = 0
+ test_local
+
+ memory check
+ for i 0 10000
+  test_local
+ end    
+ memory check
+  
+end
