Mercurial > hg > octave-avbm
changeset 1509:36477a20e8c8
[project @ 1995-10-03 10:34:12 by jwe]
author | jwe |
---|---|
date | Tue, 03 Oct 1995 10:35:19 +0000 |
parents | 7f0a08d41c84 |
children | fe9c39fd89c7 |
files | src/user-prefs.cc src/variables.cc |
diffstat | 2 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/user-prefs.cc +++ b/src/user-prefs.cc @@ -515,6 +515,21 @@ } +// Generate warning if a statement in a function or script file is not +// terminated with a semicolon. Useful for checking scripts and +// functions that should only produce output using explicit printing +// statements. + +int +warn_missing_semicolon (void) +{ + user_pref.warn_missing_semicolon = + check_preference ("warn_missing_semicolon"); + + return 0; +} + + // Should whitespace in a literal matrix list be automatically // converted to commas and semicolons? //
--- a/src/variables.cc +++ b/src/variables.cc @@ -1827,6 +1827,11 @@ 1.0, 0, warn_function_name_clash, "produce warning if function name conflicts with file name"); + DEFVAR ("warn_missing_semicolon", SBV_warn_missing_semicolon, + 0.0, 0, warn_missing_semicolon, + "produce a warning if a statement in a script or function file is +not terminated with a semicolon") + DEFVAR ("whitespace_in_literal_matrix", SBV_whitespace_in_literal_matrix, "", 0, whitespace_in_literal_matrix,