diff -r e437bacb3ef6 NEWS
--- a/NEWS	Mon Jul 02 10:26:19 2012 +0200
+++ b/NEWS	Mon Jul 02 17:17:35 2012 -0700
@@ -44,6 +44,20 @@
     strings.  In addition, the regexprep function now processes backslash
     escapes in single-quoted replacement strings.
 
+ ** New parser syntax for global and persistent variable initialization
+    
+    Initialization of variables occurs just once when a script is first
+    executed.  Initialization uses the syntax ':=' to assign a variable
+    a value.  This distinguishes it from ordinary assignment which uses
+    '=' and happens every time a script is run.  Examples:
+
+    global gvar := 1;
+    persistent pvar := [1, 2, 3];
+
+    A new warning ID, "Octave:initialization_syntax", controls whether
+    a message about deprecated syntax is issued.  The default is to
+    issue a warning.
+
  ** Redundant terminal comma accepted by parser
 
     A redundant terminal comma is now accepted in matrix
@@ -102,6 +116,12 @@
 
       static
 
+    The following syntax has been deprecated in Octave 3.8 and will
+    be removed from Octave 3.12 (or whatever version is the second major
+    release after 3.8):
+
+      '=' for global and persistent variable initialization
+
 Summary of important user-visible changes for version 3.6:
 ---------------------------------------------------------
 
diff -r e437bacb3ef6 doc/interpreter/func.txi
--- a/doc/interpreter/func.txi	Mon Jul 02 10:26:19 2012 +0200
+++ b/doc/interpreter/func.txi	Mon Jul 02 17:17:35 2012 -0700
@@ -918,7 +918,7 @@
 @example
 @group
 function count_calls()
-  persistent calls = 0;
+  persistent calls := 0;
   printf ("'count_calls' has been called %d times\n",
           ++calls);
 endfunction
@@ -942,7 +942,7 @@
 @group
 function count_calls ()
   mlock ();
-  persistent calls = 0;
+  persistent calls := 0;
   printf ("'count_calls' has been called %d times\n",
           ++calls);
 endfunction
diff -r e437bacb3ef6 doc/interpreter/var.txi
--- a/doc/interpreter/var.txi	Mon Jul 02 10:26:19 2012 +0200
+++ b/doc/interpreter/var.txi	Mon Jul 02 17:17:35 2012 -0700
@@ -93,25 +93,27 @@
 @group
 global a
 global a b
-global c = 2
-global d = 3 e f = 5
+global c := 2
+global d := 3 e f := 5
 @end group
 @end example
 
-A global variable may only be initialized once in a @code{global}
-statement.  For example, after executing the following code
+A global variable may be initialized using the initialization
+syntax @samp{:=} rather than the ordinary assignment operator @samp{=}.
+However, initialization may only be done once and subsequent initialization
+values will be ignored.  For example, after executing the following code
 
 @example
 @group
-global gvar = 1
-global gvar = 2
+global gvar := 1
+global gvar := 2
 @end group
 @end example
 
 @noindent
 the value of the global variable @code{gvar} is 1, not 2.  Issuing a
 @samp{clear gvar} command does not change the above behavior, but
-@samp{clear all} does.
+@samp{clear all} or @samp{clear global gvar} does.
 
 It is necessary declare a variable as global within a function body in
 order to access it.  For example,
@@ -192,7 +194,7 @@
 @example
 @group
 function count_calls ()
-  persistent calls = 0;
+  persistent calls := 0;
   printf ("'count_calls' has been called %d times\n",
           ++calls);
 endfunction
@@ -216,21 +218,20 @@
 persistent a
 persistent a b
 persistent c = 2
-persistent d = 3 e f = 5
+persistent d := 3 e f := 5
 @end group
 @end example
 
 The behavior of persistent variables is equivalent to the behavior of
-static variables in C@.  The command @code{static} in Octave is also
-recognized and is equivalent to @code{persistent}.
+static variables in C@.  
 
 Like global variables, a persistent variable may only be initialized once.
 For example, after executing the following code
 
 @example
 @group
-persistent pvar = 1
-persistent pvar = 2
+persistent pvar := 1
+persistent pvar := 2
 @end group
 @end example
 
diff -r e437bacb3ef6 scripts/deprecated/__error_text__.m
--- a/scripts/deprecated/__error_text__.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/__error_text__.m	Mon Jul 02 17:17:35 2012 -0700
@@ -24,7 +24,7 @@
 
 function [msg, msgid] = __error_text__ (varargin)
 
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/deprecated/cor.m
--- a/scripts/deprecated/cor.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/cor.m	Mon Jul 02 17:17:35 2012 -0700
@@ -27,7 +27,7 @@
 
 function retval = cor (x, y = x)
 
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/deprecated/corrcoef.m
--- a/scripts/deprecated/corrcoef.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/corrcoef.m	Mon Jul 02 17:17:35 2012 -0700
@@ -48,7 +48,7 @@
 
 function retval = corrcoef (x, y = [])
 
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/deprecated/cut.m
--- a/scripts/deprecated/cut.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/cut.m	Mon Jul 02 17:17:35 2012 -0700
@@ -37,7 +37,7 @@
 
 function group = cut (x, breaks)
 
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/deprecated/error_text.m
--- a/scripts/deprecated/error_text.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/error_text.m	Mon Jul 02 17:17:35 2012 -0700
@@ -24,7 +24,7 @@
 
 function [msg, msgid] = error_text (varargin)
 
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/deprecated/isstr.m
--- a/scripts/deprecated/isstr.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/isstr.m	Mon Jul 02 17:17:35 2012 -0700
@@ -28,7 +28,7 @@
 
 function retval = isstr (varargin)
 
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/deprecated/polyderiv.m
--- a/scripts/deprecated/polyderiv.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/polyderiv.m	Mon Jul 02 17:17:35 2012 -0700
@@ -36,7 +36,7 @@
 
 function [q, d] = polyderiv (p, a)
 
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/deprecated/setstr.m
--- a/scripts/deprecated/setstr.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/setstr.m	Mon Jul 02 17:17:35 2012 -0700
@@ -28,7 +28,7 @@
 
 function retval = setstr (varargin)
 
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/deprecated/shell_cmd.m
--- a/scripts/deprecated/shell_cmd.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/shell_cmd.m	Mon Jul 02 17:17:35 2012 -0700
@@ -55,7 +55,7 @@
 ## Deprecated in version 3.6
 
 function [status, output] = shell_cmd (varargin)
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/deprecated/studentize.m
--- a/scripts/deprecated/studentize.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/studentize.m	Mon Jul 02 17:17:35 2012 -0700
@@ -32,7 +32,7 @@
 ## Description: Subtract mean and divide by standard deviation
 
 function t = studentize (x, dim)
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/deprecated/sylvester_matrix.m
--- a/scripts/deprecated/sylvester_matrix.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/deprecated/sylvester_matrix.m	Mon Jul 02 17:17:35 2012 -0700
@@ -33,7 +33,7 @@
 
 function retval = sylvester_matrix (k)
 
-  persistent warned = false;
+  persistent warned := false;
   if (! warned)
     warned = true;
     warning ("Octave:deprecated-function",
diff -r e437bacb3ef6 scripts/general/accumarray.m
--- a/scripts/general/accumarray.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/general/accumarray.m	Mon Jul 02 17:17:35 2012 -0700
@@ -340,7 +340,7 @@
       vals = mat2cell (vals(idx), diff ([0; jdx]));
       ## Optimize the case when function is @(x) {x}, i.e. we just want
       ## to collect the values to cells.
-      persistent simple_cell_str = func2str (@(x) {x});
+      persistent simple_cell_str := func2str (@(x) {x});
       if (! strcmp (func2str (func), simple_cell_str))
         vals = cellfun (func, vals);
       endif
diff -r e437bacb3ef6 scripts/general/isa.m
--- a/scripts/general/isa.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/general/isa.m	Mon Jul 02 17:17:35 2012 -0700
@@ -31,11 +31,11 @@
     print_usage ();
   endif
 
-  persistent float_classes = {"double", "single"};
+  persistent float_classes := {"double", "single"};
 
-  persistent fnum_classes = {"double", "single", ...
-                             "uint8", "uint16", "uint32", "uint64", ...
-                             "int8", "int16", "int32", "int64"};
+  persistent fnum_classes := {"double", "single", ...
+                              "uint8", "uint16", "uint32", "uint64", ...
+                              "int8", "int16", "int32", "int64"};
 
   if (strcmp (cname, "float"))
     retval = any (strcmp (class (obj), float_classes));
diff -r e437bacb3ef6 scripts/general/quadgk.m
--- a/scripts/general/quadgk.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/general/quadgk.m	Mon Jul 02 17:17:35 2012 -0700
@@ -397,16 +397,16 @@
   ## A (15,7) point pair of Gauss-Konrod quadrature rules. The abscissa
   ## and weights are copied directly from dqk15w.f from quadpack
 
-  persistent abscissa = [-0.9914553711208126e+00, -0.9491079123427585e+00, ...
-                         -0.8648644233597691e+00, -0.7415311855993944e+00, ...
-                         -0.5860872354676911e+00, -0.4058451513773972e+00, ...
-                         -0.2077849550078985e+00,  0.0000000000000000e+00, ...
-                          0.2077849550078985e+00,  0.4058451513773972e+00, ...
-                          0.5860872354676911e+00,  0.7415311855993944e+00, ...
-                          0.8648644233597691e+00,  0.9491079123427585e+00, ...
-                          0.9914553711208126e+00];
+  persistent abscissa := [-0.9914553711208126e+00, -0.9491079123427585e+00, ...
+                          -0.8648644233597691e+00, -0.7415311855993944e+00, ...
+                          -0.5860872354676911e+00, -0.4058451513773972e+00, ...
+                          -0.2077849550078985e+00,  0.0000000000000000e+00, ...
+                           0.2077849550078985e+00,  0.4058451513773972e+00, ...
+                           0.5860872354676911e+00,  0.7415311855993944e+00, ...
+                           0.8648644233597691e+00,  0.9491079123427585e+00, ...
+                           0.9914553711208126e+00];
 
-  persistent weights15 = ...
+  persistent weights15 := ...
       diag ([0.2293532201052922e-01,  0.6309209262997855e-01, ...
              0.1047900103222502e+00,  0.1406532597155259e+00, ...
              0.1690047266392679e+00,  0.1903505780647854e+00, ...
@@ -416,7 +416,7 @@
              0.1047900103222502e+00,  0.6309209262997855e-01, ...
              0.2293532201052922e-01]);
 
-  persistent weights7  = ...
+  persistent weights7  := ...
       diag ([0.1294849661688697e+00,  0.2797053914892767e+00, ...
              0.3818300505051889e+00,  0.4179591836734694e+00, ...
              0.3818300505051889e+00,  0.2797053914892767e+00, ...
diff -r e437bacb3ef6 scripts/help/unimplemented.m
--- a/scripts/help/unimplemented.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/help/unimplemented.m	Mon Jul 02 17:17:35 2012 -0700
@@ -75,7 +75,7 @@
 endfunction
 
 function list = missing_functions ()
-  persistent list = {
+  persistent list := {
   "DelaunayTri",
   "MException",
   "RandStream",
diff -r e437bacb3ef6 scripts/image/colormap.m
--- a/scripts/image/colormap.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/image/colormap.m	Mon Jul 02 17:17:35 2012 -0700
@@ -52,7 +52,7 @@
     print_usage ();
   endif
 
-  persistent map_list = cell ();
+  persistent map_list := cell ();
 
   if (nargin == 1)
 
diff -r e437bacb3ef6 scripts/image/imwrite.m
--- a/scripts/image/imwrite.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/image/imwrite.m	Mon Jul 02 17:17:35 2012 -0700
@@ -65,11 +65,11 @@
 
 function imwrite (img, varargin)
 
-  persistent imwrite_possible_formats = {
+  persistent imwrite_possible_formats := {
     "bmp"; "gif"; "jp2"; "jpg"; "jpx"; "jpeg"; "hdf"; "pbm"; "pcx";
     "pgm"; "png"; "pnm"; "ppm"; "ras"; "tif"; "tiff"; "xwd" };
 
-  persistent accepted_formats = __magick_format_list__ (imwrite_possible_formats);
+  persistent accepted_formats := __magick_format_list__ (imwrite_possible_formats);
 
   if (nargin < 2 || ! (isnumeric (img) || islogical (img)))
     print_usage ();
diff -r e437bacb3ef6 scripts/miscellaneous/edit.m
--- a/scripts/miscellaneous/edit.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/miscellaneous/edit.m	Mon Jul 02 17:17:35 2012 -0700
@@ -150,13 +150,13 @@
 
   ## Pick up globals or default them.
 
-  persistent FUNCTION = struct ("EDITOR", cstrcat (EDITOR (), " %s"),
-                                "HOME", fullfile (default_home, "octave"),
-                                "AUTHOR", default_user(1),
-                                "EMAIL",  [],
-                                "LICENSE",  "GPL",
-                                "MODE", "async",
-                                "EDITINPLACE", false);
+  persistent FUNCTION := struct ("EDITOR", cstrcat (EDITOR (), " %s"),
+                                 "HOME", fullfile (default_home, "octave"),
+                                 "AUTHOR", default_user(1),
+                                 "EMAIL",  [],
+                                 "LICENSE",  "GPL",
+                                 "MODE", "async",
+                                 "EDITINPLACE", false);
   ## Make sure the state variables survive "clear functions".
   mlock;
 
diff -r e437bacb3ef6 scripts/miscellaneous/fact.m
--- a/scripts/miscellaneous/fact.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/miscellaneous/fact.m	Mon Jul 02 17:17:35 2012 -0700
@@ -25,7 +25,7 @@
 
 
 function f = fact ()
-  persistent wisdom = ...
+  persistent wisdom := ...
       {
        "Richard Stallman takes notes in binary.";
        "Richard Stallman doesn't need sudo. I will make him a sandwich anyway.";
diff -r e437bacb3ef6 scripts/miscellaneous/recycle.m
--- a/scripts/miscellaneous/recycle.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/miscellaneous/recycle.m	Mon Jul 02 17:17:35 2012 -0700
@@ -31,7 +31,7 @@
 
 function retval = recycle (state)
 
-  persistent current_state = "off";
+  persistent current_state := "off";
 
   if (nargin > 1)
     print_usage ();
diff -r e437bacb3ef6 scripts/miscellaneous/warning_ids.m
--- a/scripts/miscellaneous/warning_ids.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/miscellaneous/warning_ids.m	Mon Jul 02 17:17:35 2012 -0700
@@ -160,6 +160,12 @@
 ## printed for implicit conversions of complex numbers to real numbers.
 ## By default, the @code{Octave:imag-to-real} warning is disabled.
 ##
+## @item Octave:initialization-syntax
+## If the @code{Octave:initialization-syntax} warning is enabled, a warning is
+## printed when the deprecated syntax '=', instead of ':=', is used for
+## initializing global or persistent variables.
+## By default, the @code{Octave:initialization-syntax} warning is enabled.
+##
 ## @item Octave:load-file-in-path
 ## By default, the @code{Octave:load-file-in-path} warning is enabled.
 ##
diff -r e437bacb3ef6 scripts/optimization/__all_opts__.m
--- a/scripts/optimization/__all_opts__.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/optimization/__all_opts__.m	Mon Jul 02 17:17:35 2012 -0700
@@ -26,13 +26,13 @@
 
 function names = __all_opts__ (varargin)
 
-  persistent saved_names = {};
+  persistent saved_names := {};
 
   ## do not clear this function
   mlock ();
 
   ## guard against recursive calls.
-  persistent recursive = false;
+  persistent recursive := false;
 
   if (recursive)
     names = {};
diff -r e437bacb3ef6 scripts/optimization/fsolve.m
--- a/scripts/optimization/fsolve.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/optimization/fsolve.m	Mon Jul 02 17:17:35 2012 -0700
@@ -102,7 +102,7 @@
 ##
 ## @example
 ## function [fvec, fjac] = user_func (x, optimvalues, state)
-## persistent sav = [], sav0 = [];
+## persistent sav := [] sav0 = [];
 ## if (nargin == 1)
 ##   ## evaluation call
 ##   if (nargout == 1)
diff -r e437bacb3ef6 scripts/optimization/fzero.m
--- a/scripts/optimization/fzero.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/optimization/fzero.m	Mon Jul 02 17:17:35 2012 -0700
@@ -121,7 +121,7 @@
   maxiter = optimget (options, "MaxIter", Inf);
   maxfev = optimget (options, "MaxFunEvals", Inf);
 
-  persistent mu = 0.5;
+  persistent mu := 0.5;
 
   if (funvalchk)
     ## Replace fun with a guarded version.
diff -r e437bacb3ef6 scripts/pkg/pkg.m
--- a/scripts/pkg/pkg.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/pkg/pkg.m	Mon Jul 02 17:17:35 2012 -0700
@@ -262,12 +262,12 @@
 
 function [local_packages, global_packages] = pkg (varargin)
   ## Installation prefix (FIXME: what should these be on windows?)
-  persistent user_prefix = false;
-  persistent prefix = -1;
-  persistent archprefix = -1;
-  persistent local_list = tilde_expand (fullfile ("~", ".octave_packages"));
-  persistent global_list = fullfile (OCTAVE_HOME (), "share", "octave",
-                                     "octave_packages");
+  persistent user_prefix := false;
+  persistent prefix := -1;
+  persistent archprefix := -1;
+  persistent local_list := tilde_expand (fullfile ("~", ".octave_packages"));
+  persistent global_list := fullfile (OCTAVE_HOME (), "share", "octave",
+                                      "octave_packages");
 
   confirm_recursive_rmdir (false, "local");
 
diff -r e437bacb3ef6 scripts/pkg/private/getarch.m
--- a/scripts/pkg/private/getarch.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/pkg/private/getarch.m	Mon Jul 02 17:17:35 2012 -0700
@@ -23,8 +23,8 @@
 ## @end deftypefn
 
 function arch = getarch ()
-  persistent _arch = cstrcat (octave_config_info ("canonical_host_type"),
-                              "-", octave_config_info ("api_version"));
+  persistent _arch := cstrcat (octave_config_info ("canonical_host_type"),
+                               "-", octave_config_info ("api_version"));
   arch = _arch;
 endfunction
 
diff -r e437bacb3ef6 scripts/pkg/private/is_architecture_dependent.m
--- a/scripts/pkg/private/is_architecture_dependent.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/pkg/private/is_architecture_dependent.m	Mon Jul 02 17:17:35 2012 -0700
@@ -23,7 +23,7 @@
 ## @end deftypefn
 
 function dep = is_architecture_dependent (nm)
-  persistent archdepsuffix = {".oct",".mex",".a",".lib",".so",".so.*",".dll","dylib"};
+  persistent archdepsuffix := {".oct",".mex",".a",".lib",".so",".so.*",".dll","dylib"};
 
   dep = false;
   for i = 1 : length (archdepsuffix)
diff -r e437bacb3ef6 scripts/plot/area.m
--- a/scripts/plot/area.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/area.m	Mon Jul 02 17:17:35 2012 -0700
@@ -163,7 +163,7 @@
 endfunction
 
 function move_baseline (h, d)
-  persistent recursion = false;
+  persistent recursion := false;
 
   ## Don't allow recursion
   if (! recursion)
diff -r e437bacb3ef6 scripts/plot/legend.m
--- a/scripts/plot/legend.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/legend.m	Mon Jul 02 17:17:35 2012 -0700
@@ -820,7 +820,7 @@
 endfunction
 
 function updatelegend (h, d)
-  persistent recursive = false;
+  persistent recursive := false;
   if (! recursive)
     recursive = true;
     unwind_protect
diff -r e437bacb3ef6 scripts/plot/linkprop.m
--- a/scripts/plot/linkprop.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/linkprop.m	Mon Jul 02 17:17:35 2012 -0700
@@ -61,7 +61,7 @@
 endfunction
 
 function update_prop (h, d, hlist, prop)
-  persistent recursion = false;
+  persistent recursion := false;
 
   ## Don't allow recursion
   if (! recursion)
diff -r e437bacb3ef6 scripts/plot/plotyy.m
--- a/scripts/plot/plotyy.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/plotyy.m	Mon Jul 02 17:17:35 2012 -0700
@@ -292,7 +292,7 @@
 endfunction
 
 function update_nextplot (h, d, ax2)
-  persistent recursion = false;
+  persistent recursion := false;
   prop = "nextplot";
   if (! recursion)
     unwind_protect
@@ -305,7 +305,7 @@
 endfunction
 
 function update_position (h, d, ax2)
-  persistent recursion = false;
+  persistent recursion := false;
 
   ## Don't allow recursion
   if (! recursion)
diff -r e437bacb3ef6 scripts/plot/private/__bar__.m
--- a/scripts/plot/private/__bar__.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/private/__bar__.m	Mon Jul 02 17:17:35 2012 -0700
@@ -317,7 +317,7 @@
 endfunction
 
 function show_baseline (h, d)
-  persistent recursion = false;
+  persistent recursion := false;
 
   ## Don't allow recursion
   if (! recursion)
@@ -359,7 +359,7 @@
 endfunction
 
 function update_data (h, d)
-  persistent recursion = false;
+  persistent recursion := false;
 
   ## Don't allow recursion
   if (! recursion)
@@ -396,7 +396,7 @@
 endfunction
 
 function update_group (h, d)
-  persistent recursion = false;
+  persistent recursion := false;
 
   ## Don't allow recursion
   if (! recursion)
diff -r e437bacb3ef6 scripts/plot/private/__contour__.m
--- a/scripts/plot/private/__contour__.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/private/__contour__.m	Mon Jul 02 17:17:35 2012 -0700
@@ -434,7 +434,7 @@
 endfunction
 
 function update_data (h, d)
-  persistent recursive = false;
+  persistent recursive := false;
 
   if (!recursive)
     recursive = true;
@@ -492,7 +492,7 @@
 endfunction
 
 function update_text (h, d)
-  persistent recursive = false;
+  persistent recursive := false;
 
   if (!recursive)
     recursive = true;
diff -r e437bacb3ef6 scripts/plot/private/__gnuplot_version__.m
--- a/scripts/plot/private/__gnuplot_version__.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/private/__gnuplot_version__.m	Mon Jul 02 17:17:35 2012 -0700
@@ -27,7 +27,7 @@
 
 function version = __gnuplot_version__ ()
 
-  persistent __version__ = "";
+  persistent __version__ := "";
 
   if (isempty (__version__))
     [status, output] = system (sprintf ("\"%s\" --version", gnuplot_binary ()));
diff -r e437bacb3ef6 scripts/plot/private/__go_draw_axes__.m
--- a/scripts/plot/private/__go_draw_axes__.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/private/__go_draw_axes__.m	Mon Jul 02 17:17:35 2012 -0700
@@ -2095,7 +2095,7 @@
 function do_tics_1 (ticmode, tics, mtics, labelmode, labels, color, ax,
                     plot_stream, mirror, mono, axispos, tickdir, ticklength,
                     fontname, fontspec, interpreter, scale, sgn, gnuplot_term)
-  persistent warned_latex = false;
+  persistent warned_latex := false;
   if (strcmpi (interpreter, "tex"))
     for n = 1 : numel(labels)
       labels{n} = __tex2enhanced__ (labels{n}, fontname, false, false);
@@ -2262,7 +2262,7 @@
 
 function [str, f, s] = __maybe_munge_text__ (enhanced, obj, fld)
 
-  persistent warned_latex = false;
+  persistent warned_latex := false;
 
   if (strcmp (fld, "string"))
     [f, s, fnt, it, bld] = get_fontname_and_size (obj);
@@ -2337,8 +2337,8 @@
 endfunction
 
 function str = __tex2enhanced__ (str, fnt, it, bld)
-  persistent sym = __setup_sym_table__ ();
-  persistent flds = fieldnames (sym);
+  persistent sym := __setup_sym_table__ ();
+  persistent flds := fieldnames (sym);
 
   [s, e, m] = regexp(str,'\\\\([a-zA-Z]+|0)','start','end','matches');
 
diff -r e437bacb3ef6 scripts/plot/private/__marching_cube__.m
--- a/scripts/plot/private/__marching_cube__.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/private/__marching_cube__.m	Mon Jul 02 17:17:35 2012 -0700
@@ -84,8 +84,8 @@
 
 function [T, p, col] = __marching_cube__ (xx, yy, zz, c, iso, colors)
 
-  persistent edge_table=[];
-  persistent tri_table=[];
+  persistent edge_table := [];
+  persistent tri_table := [];
 
   calc_cols = false;
   lindex = 4;
diff -r e437bacb3ef6 scripts/plot/private/__patch__.m
--- a/scripts/plot/private/__patch__.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/private/__patch__.m	Mon Jul 02 17:17:35 2012 -0700
@@ -353,7 +353,7 @@
 endfunction
 
 function update_handle (h, isfv)
-  persistent recursive = false;
+  persistent recursive := false;
 
   if (! recursive)
     recursive = true;
diff -r e437bacb3ef6 scripts/plot/private/__print_parse_opts__.m
--- a/scripts/plot/private/__print_parse_opts__.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/private/__print_parse_opts__.m	Mon Jul 02 17:17:35 2012 -0700
@@ -24,7 +24,7 @@
 
 function arg_st = __print_parse_opts__ (varargin)
 
-  persistent warn_on_missing_binary = true
+  persistent warn_on_missing_binary := true
 
   arg_st.append_to_file = false;
   arg_st.canvas_size = [];
@@ -455,9 +455,9 @@
 
 function gs = __ghostscript_binary__ ()
 
-  persistent ghostscript_binary = ""
-  persistent warn_on_no_ghostscript = true
-  persistent warn_on_bad_gsc = true
+  persistent ghostscript_binary := ""
+  persistent warn_on_no_ghostscript := true
+  persistent warn_on_bad_gsc := true
 
   if (isempty (ghostscript_binary))
     GSC = getenv ("GSC");
@@ -497,7 +497,7 @@
 
 function bin = __find_binary__ (binary)
 
-  persistent data = struct ()
+  persistent data := struct ()
 
   if (! isfield (data, binary))
     ## Reinitialize when `user_binaries' is present.
diff -r e437bacb3ef6 scripts/plot/rectangle.m
--- a/scripts/plot/rectangle.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/plot/rectangle.m	Mon Jul 02 17:17:35 2012 -0700
@@ -150,7 +150,7 @@
 endfunction
 
 function update_data (h, d)
-  persistent recursion = false;
+  persistent recursion := false;
 
   ## Don't allow recursion
   if (!recursion)
diff -r e437bacb3ef6 scripts/sparse/svds.m
--- a/scripts/sparse/svds.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/sparse/svds.m	Mon Jul 02 17:17:35 2012 -0700
@@ -92,7 +92,7 @@
 
 function [u, s, v, flag] = svds (A, k, sigma, opts)
 
-  persistent root2 = sqrt (2);
+  persistent root2 := sqrt (2);
 
   if (nargin < 1 || nargin > 4)
     print_usage ();
diff -r e437bacb3ef6 scripts/specfun/legendre.m
--- a/scripts/specfun/legendre.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/specfun/legendre.m	Mon Jul 02 17:17:35 2012 -0700
@@ -156,7 +156,7 @@
 
 function retval = legendre (n, x, normalization)
 
-  persistent warned_overflow = false;
+  persistent warned_overflow := false;
 
   if (nargin < 2 || nargin > 3)
     print_usage ();
diff -r e437bacb3ef6 scripts/testfun/test.m
--- a/scripts/testfun/test.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/testfun/test.m	Mon Jul 02 17:17:35 2012 -0700
@@ -75,11 +75,11 @@
 
 function [__ret1, __ret2, __ret3, __ret4] = test (__name, __flag, __fid)
   ## Information from test will be introduced by "key".
-  persistent __signal_fail =  "!!!!! ";
-  persistent __signal_empty = "????? ";
-  persistent __signal_block = "  ***** ";
-  persistent __signal_file =  ">>>>> ";
-  persistent __signal_skip = "----- ";
+  persistent __signal_fail  := "!!!!! ";
+  persistent __signal_empty := "????? ";
+  persistent __signal_block := "  ***** ";
+  persistent __signal_file  := ">>>>> ";
+  persistent __signal_skip  := "----- ";
 
   __xfail = 0;
   __xskip = 0;
@@ -344,7 +344,7 @@
 
     elseif (strcmp (__type, "function"))
       __istest = 0;
-      persistent __fn = 0;
+      persistent __fn := 0;
       __name_position = function_name (__block);
       if (isempty (__name_position))
         __success = 0;
diff -r e437bacb3ef6 scripts/time/addtodate.m
--- a/scripts/time/addtodate.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/time/addtodate.m	Mon Jul 02 17:17:35 2012 -0700
@@ -30,8 +30,8 @@
 
 function d = addtodate (d, q, f)
 
-  persistent mult = struct ("day", 1, "hour", 1/24, "minute", 1/1440, ...
-                            "second", 1/86400, "millisecond", 1/86400000);
+  persistent mult := struct ("day", 1, "hour", 1/24, "minute", 1/1440, ...
+                             "second", 1/86400, "millisecond", 1/86400000);
 
   if (nargin != 3)
     print_usage ();
diff -r e437bacb3ef6 scripts/time/datenum.m
--- a/scripts/time/datenum.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/time/datenum.m	Mon Jul 02 17:17:35 2012 -0700
@@ -84,8 +84,8 @@
 function [days, secs] = datenum (year, month = [], day = [], hour = 0, minute = 0, second = 0)
 
   ## Days until start of month assuming year starts March 1.
-  persistent monthstart = [306; 337; 0; 31; 61; 92; 122; 153; 184; 214; 245; 275];
-  persistent monthlength = [31; 28; 31; 30; 31; 30; 31; 31; 30; 31; 30; 31];
+  persistent monthstart := [306; 337; 0; 31; 61; 92; 122; 153; 184; 214; 245; 275];
+  persistent monthlength := [31; 28; 31; 30; 31; 30; 31; 31; 30; 31; 30; 31];
 
   if (nargin == 0 || nargin > 6 || 
      (nargin > 2 && (ischar (year) || iscellstr (year))))
diff -r e437bacb3ef6 scripts/time/datetick.m
--- a/scripts/time/datetick.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/scripts/time/datetick.m	Mon Jul 02 17:17:35 2012 -0700
@@ -281,9 +281,9 @@
 ## A translation from Tom Holoryd's python code at
 ## http://kurage.nimh.nih.gov/tomh/tics.py
 function sep = __calc_tick_sep__ (lo, hi)
-  persistent sqrt_2  = sqrt (2.0);
-  persistent sqrt_10 = sqrt (10.0);
-  persistent sqrt_50 = sqrt (50.0);
+  persistent sqrt_2  := sqrt (2.0);
+  persistent sqrt_10 := sqrt (10.0);
+  persistent sqrt_50 := sqrt (50.0);
 
   ticint = 5;
 
diff -r e437bacb3ef6 src/lex.ll
--- a/src/lex.ll	Mon Jul 02 10:26:19 2012 +0200
+++ b/src/lex.ll	Mon Jul 02 17:17:35 2012 -0700
@@ -935,6 +935,7 @@
 "^"     { LEXER_DEBUG ("^"); BIN_OP_RETURN (POW, false, false); }
 "**"    { LEXER_DEBUG ("**"); XBIN_OP_RETURN (POW, false, false); }
 "="     { LEXER_DEBUG ("="); BIN_OP_RETURN ('=', true, false); }
+":="    { LEXER_DEBUG (":="); BIN_OP_RETURN (INIT_ASSIGN, true, false); }
 "&&"    { LEXER_DEBUG ("&&"); BIN_OP_RETURN (EXPR_AND_AND, false, false); }
 "||"    { LEXER_DEBUG ("||"); BIN_OP_RETURN (EXPR_OR_OR, false, false); }
 "<<"    { LEXER_DEBUG ("<<"); XBIN_OP_RETURN (LSHIFT, false, false); }
@@ -3624,6 +3625,7 @@
   switch (tok)
     {
     case '=': std::cerr << "'='\n"; break;
+    case INIT_ASSIGN: std::cerr << "':='\n"; break;
     case ':': std::cerr << "':'\n"; break;
     case '-': std::cerr << "'-'\n"; break;
     case '+': std::cerr << "'+'\n"; break;
diff -r e437bacb3ef6 src/oct-parse.yy
--- a/src/oct-parse.yy	Mon Jul 02 10:26:19 2012 +0200
+++ b/src/oct-parse.yy	Mon Jul 02 17:17:35 2012 -0700
@@ -175,6 +175,10 @@
 static void
 maybe_warn_assign_as_truth_value (tree_expression *expr);
 
+// Maybe print a warning about deprecated initialization syntax (not ':=')
+static void
+maybe_warn_initialization_syntax (tree_expression *expr);
+
 // Maybe print a warning about switch labels that aren't constants.
 static void
 maybe_warn_variable_switch_label (tree_expression *expr);
@@ -429,7 +433,7 @@
 }
 
 // Tokens with line and column information.
-%token <tok_val> '=' ':' '-' '+' '*' '/'
+%token <tok_val> '=' INIT_ASSIGN ':' '-' '+' '*' '/'
 %token <tok_val> ADD_EQ SUB_EQ MUL_EQ DIV_EQ LEFTDIV_EQ POW_EQ
 %token <tok_val> EMUL_EQ EDIV_EQ ELEFTDIV_EQ EPOW_EQ AND_EQ OR_EQ
 %token <tok_val> LSHIFT_EQ RSHIFT_EQ LSHIFT RSHIFT
@@ -497,6 +501,7 @@
 %type <tree_switch_case_type> switch_case default_case
 %type <tree_switch_case_list_type> case_list1 case_list
 %type <tree_decl_elt_type> decl2
+%type <tree_decl_elt_type> decl3
 %type <tree_decl_init_list_type> decl1
 %type <tree_decl_command_type> declaration
 %type <tree_statement_type> statement function_end classdef_end
@@ -1024,6 +1029,31 @@
                   { $$ = new tree_decl_elt ($1); }
                 | identifier '=' decl_param_init expression
                   {
+                    maybe_warn_initialization_syntax ($1);
+
+                    lexer_flags.looking_at_initializer_expression = false;
+                    $$ = new tree_decl_elt ($1, $4);
+                  }
+                | identifier INIT_ASSIGN decl_param_init expression
+                  {
+                    lexer_flags.looking_at_initializer_expression = false;
+                    $$ = new tree_decl_elt ($1, $4);
+                  }
+                | magic_tilde
+                  {
+                    $$ = new tree_decl_elt ($1);
+                  }
+                ;
+
+decl3           : identifier
+                  { $$ = new tree_decl_elt ($1); }
+                | identifier '=' decl_param_init expression
+                  {
+                    lexer_flags.looking_at_initializer_expression = false;
+                    $$ = new tree_decl_elt ($1, $4);
+                  }
+                | identifier INIT_ASSIGN decl_param_init expression
+                  {
                     lexer_flags.looking_at_initializer_expression = false;
                     $$ = new tree_decl_elt ($1, $4);
                   }
@@ -1293,9 +1323,9 @@
                   }
                 ;
 
-param_list2     : decl2
+param_list2     : decl3
                   { $$ = new tree_parameter_list ($1); }
-                | param_list2 ',' decl2
+                | param_list2 ',' decl3
                   {
                     $1->append ($3);
                     $$ = $1;
@@ -1877,6 +1907,17 @@
     }
 }
 
+// Maybe print a warning about deprecated initialization syntax (not ':=')
+
+static void
+maybe_warn_initialization_syntax (tree_expression *expr)
+{
+  warning_with_id
+    ("Octave:initialization-syntax",
+     "deprecated initialization syntax (replace '=' with ':=') near line %d, column %d in file `%s'",
+     expr->line (), expr->column (), curr_fcn_file_full_name.c_str ());
+}
+
 // Maybe print a warning about switch labels that aren't constants.
 
 static void
diff -r e437bacb3ef6 test/fntests.m
--- a/test/fntests.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/test/fntests.m	Mon Jul 02 17:17:35 2012 -0700
@@ -18,8 +18,8 @@
 
 clear all;
 
-global files_with_no_tests = {};
-global files_with_tests = {};
+global files_with_no_tests := {};
+global files_with_tests := {};
 global topsrcdir;
 global topbuilddir;
 
diff -r e437bacb3ef6 test/nest/persistent_nest.m
--- a/test/nest/persistent_nest.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/test/nest/persistent_nest.m	Mon Jul 02 17:17:35 2012 -0700
@@ -1,6 +1,6 @@
 # persistent_nest
 function y = persistent_nest ()
-  persistent x = 0;
+  persistent x := 0;
   g;
   y = x;
 
diff -r e437bacb3ef6 test/nest/recursive_nest.m
--- a/test/nest/recursive_nest.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/test/nest/recursive_nest.m	Mon Jul 02 17:17:35 2012 -0700
@@ -1,6 +1,6 @@
 # recursive_nest.m
 function x = recursive_nest ()
-  global recursive_nest_inc = 1
+  global recursive_nest_inc := 1;
   x = 5;
   f (20);
 
diff -r e437bacb3ef6 test/test_global.m
--- a/test/test_global.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/test/test_global.m	Mon Jul 02 17:17:35 2012 -0700
@@ -18,7 +18,7 @@
 
 %% test/octave.test/global/global-1.m
 %!test
-%! global G = 1;
+%! global G := 1;
 %! assert (G,1);
 
 %% test/octave.test/global/global-2.m
@@ -27,7 +27,7 @@
 %!  assert (G,1);
 %!endfunction
 %!test
-%! global G = 1;
+%! global G := 1;
 %! f;
 
 %% test/octave.test/global/global-3.m
@@ -35,12 +35,12 @@
 %!  fail ("G");
 %!endfunction
 %!test
-%! global G = 1;
+%! global G := 1;
 %! f();
 
 %% test/octave.test/global/global-4.m
 %!function f ()
-%!  global H = 1;
+%!  global H := 1;
 %!endfunction
 %!test
 %!  f;
@@ -48,7 +48,7 @@
 
 %% test/octave.test/global/global-5.m
 %!function f ()
-%!  global H = 1;
+%!  global H := 1;
 %!endfunction
 %!test
 %!function g ()
@@ -58,7 +58,7 @@
 
 %% test/octave.test/global/global-6.m
 %!function f ()
-%!  global H = 1;
+%!  global H := 1;
 %!endfunction
 %!function g ()
 %!  global H;
@@ -71,14 +71,14 @@
 %% test/octave.test/global/global-7.m
 %!test
 %!function f ()
-%!  global H = 1;
+%!  global H := 1;
 %!endfunction
 %!test
 %! fail ("H");
 
 %% test/octave.test/global/global-8.m
 %!function f ()
-%!  global H = 1;
+%!  global H := 1;
 %!endfunction
 %!function g ()
 %!  global H;
diff -r e437bacb3ef6 test/test_io.m
--- a/test/test_io.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/test/test_io.m	Mon Jul 02 17:17:35 2012 -0700
@@ -35,43 +35,43 @@
 %!  ## scalar
 %!  a1 = 1;
 %!  ## matrix
-%!  persistent a2 = hilb(3);
+%!  persistent a2 := hilb(3);
 %!  ## complex scalar
-%!  persistent a3 = 1 + 1i;
+%!  persistent a3 := 1 + 1i;
 %!  ## complex matrix
-%!  persistent a4 = hilb(3) + 1i*hilb(3);
+%!  persistent a4 := hilb(3) + 1i*hilb(3);
 %!  ## bool
-%!  persistent a5 = (1 == 1);
+%!  persistent a5 := (1 == 1);
 %!  ## bool matrix
-%!  persistent a6 = ([ones(1,5), zeros(1,5)] == ones (1,10));
+%!  persistent a6 := ([ones(1,5), zeros(1,5)] == ones (1,10));
 %!  ## range
-%!  persistent a7 = 1:10;
+%!  persistent a7 := 1:10;
 %!  ## structure
-%!  persistent a8 = struct ("a", a1, "b", a3);
+%!  persistent a8 := struct ("a", a1, "b", a3);
 %!  ## cell array
-%!  persistent a9 = {a1, a3};
+%!  persistent a9 := {a1, a3};
 %!  ## string
-%!  persistent a10 = ["test"; "strings"];
+%!  persistent a10 := ["test"; "strings"];
 %!  ## int8 array
-%!  persistent a11 = int8 (floor (256*rand (2,2)));
+%!  persistent a11 := int8 (floor (256*rand (2,2)));
 %!  ## int16 array
-%!  persistent a12 = int16 (floor (65536*rand (2,2)));
+%!  persistent a12 := int16 (floor (65536*rand (2,2)));
 %!  ## int32 array
-%!  persistent a13 = int32 (floor (1e6*rand (2,2)));
+%!  persistent a13 := int32 (floor (1e6*rand (2,2)));
 %!  ## int64 array
-%!  persistent a14 = int64 (floor (10*rand (2,2)));
+%!  persistent a14 := int64 (floor (10*rand (2,2)));
 %!  ## uint8 array
-%!  persistent a15 = uint8 (floor (256*rand (2,2)));
+%!  persistent a15 := uint8 (floor (256*rand (2,2)));
 %!  ## uint16 array
-%!  persistent a16 = uint16 (floor (65536*rand (2,2)));
+%!  persistent a16 := uint16 (floor (65536*rand (2,2)));
 %!  ## int32 array
-%!  persistent a17 = uint32 (floor (1e6*rand (2,2)));
+%!  persistent a17 := uint32 (floor (1e6*rand (2,2)));
 %!  ## uint64 array
-%!  persistent a18 = uint64 (floor (10*rand (2,2)));
+%!  persistent a18 := uint64 (floor (10*rand (2,2)));
 %!  ## sparse
-%!  persistent a19 = sprandn (100,100,0.01);
+%!  persistent a19 := sprandn (100,100,0.01);
 %!  ## complex sparse
-%!  persistent a20 = sprandn (100,100,0.01) + 1i * sprandn (100,100,0.01);
+%!  persistent a20 := sprandn (100,100,0.01) + 1i * sprandn (100,100,0.01);
 %!
 %!  ret = 0;
 %!
diff -r e437bacb3ef6 test/test_unwind.m
--- a/test/test_unwind.m	Mon Jul 02 10:26:19 2012 +0200
+++ b/test/test_unwind.m	Mon Jul 02 17:17:35 2012 -0700
@@ -33,7 +33,7 @@
 %!endfunction
 %!
 %!test
-%! global g = -1;
+%! global g := -1;
 %! y = f ([3,4]);
 %! assert (y, [0,1,-1]);
 
@@ -55,6 +55,6 @@
 %!endfunction
 %!
 %!test
-%! global g = -1;
+%! global g := -1;
 %! fail ("y = f (3);", "mismatch");
 
