f



(local-variables/warning) Error in File local-variables

Hi below is the error message that I get when opening some verilog and
systemC files with Xemacs on a Fedora 8 x86 machine
I have no clue what all these errors mean. I guest it is related to
my .init.el file. I just took a file that I used many years ago. I
have include the complete file below too.
Thanks for any hint.
nike

(1) (local-variables/warning) Error in File local-variables: Symbol's
value as variable is void: compile-command

Backtrace follows:

  verilog-modify-compile-command()
  run-hooks(verilog-modify-compile-command)
  # bind (force)
  hack-local-variables(nil)
  #<compiled-function nil "...(5)" [find-file hack-local-variables]
2>()
  # (unwind-protect ...)
  call-with-condition-handler(#<compiled-function
(__call_trapping_errors_arg__) "...(17)" [__call_trapping_errors_arg__
errstr error-message-string lwarn local-variables warning "Error in
%s: %s\n\nBacktrace follows:\n\n%s" "File local-variables" backtrace-
in-condition-handler-eliminating-handler] 8> #<compiled-function nil
"...(5)" [find-file hack-local-variables] 2>)
  # (condition-case ... . ((error)))
  # bind (find-file)
  normal-mode(t)
  # bind (nomodes after-find-file-from-revert-buffer noauto warn
error)
  after-find-file(nil t)
  # (unwind-protect ...)
  # bind (inhibit-read-only error number truename rawfile nowarn
filename buf)
  find-file-noselect-1(#<buffer "sc_main.cpp"> "/home/gkamendje/
Projects/decoder/systemc/sc_main.cpp" nil nil "/Projects/decoder/
systemc/sc_main.cpp" (2392094 64768))
  byte-code("..." [number truename rawfile nowarn filename buf set-
buffer-major-mode find-file-noselect-1] 7)
  # (condition-case ... . ((t (byte-code "=C2=08!=88=C3	@	A\"=87" [buf data =
kill-
buffer signal] 3))))
  # bind (number truename buf wildcards rawfile nowarn filename)
  find-file-noselect("/home/gkamendje/Projects/decoder/systemc/
sc_main.cpp" nil nil nil)
  # bind (wildcards codesys filename)
  find-file-other-window("/home/gkamendje/Projects/decoder/systemc/
sc_main.cpp")
  # bind (dir file-count line end-of-options file-p arg tem)
  command-line-1()
  # bind (command-line-args-left)
  command-line()
  # (condition-case ... . ((t (byte-code "	=10=C2=87" [error-data data nil]
1))))
  # bind (error-data)
  normal-top-level()
  # (condition-case ... . error)
  # (catch top-level ...)


;;;;########################################################################=
################
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; This is to get rid of the ^M characters on the shell output
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Try to get rid of stupid ^M in buffers.
(require 'comint)
(add-to-list 'comint-output-filter-functions
             'comint-strip-ctrl-m)
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checking" t)
(autoload 'global-flyspell-mode "flyspell" "On-the-fly spelling" t)

(setq load-path (cons (expand-file-name "~/.xemacs/.Lisp") load-
path))

;;to have line numbers on the left side
(add-hook 'text-mode-hook 'turn-on-setnu-mode)

;; (require 'comint)
;; (defun comint-convert-ctrl-m-to-newline (&optional string)
;;   "Turn `^M' characters in the current output group into newlines.
;; This function could be on `comint-output-filter-functions' or bound
to
;; a key."
;;   (interactive)
;;   (let ((pmark (process-mark (get-buffer-process (current-
buffer))))
;; (pos (if (interactive-p)
;;   comint-last-input-end
;; comint-last-output-start)))
;;     (if (marker-position pos)
;; (save-excursion
;;   (goto-char pos)
;;   (while (re-search-forward "\r+" pmark t)
;;     (replace-match "\n" t t))))))
;;
;; (add-to-list 'comint-output-filter-functions
;;              'comint-convert-ctrl-m-to-newline)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;GOOD STUFF FOR FUNCTION DOCUMENTATION
(global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-
word))))
(define-key global-map [(f4)] 'next-error)
(define-key global-map [(f5)] 'compile)
(define-key global-map [(f7)] 'recompile)
(define-key global-map [(f12)] 'indent-region)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;; GOODSTUFF FOR MAIL UNDER WINDOWS
;;  (setq user-full-name "Thomas Heller")
;;  (setq user-mail-address "thomasNoSpam.heller@ion-tof.com")


(setq send-mail-function 'smtpmail-send-it)
(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "smtp1.sympatico.ca")
(setq smtpmail-smtp-server "smtp1.sympatico.ca")
(setq smtpmail-local-domain nil)
(setq smtpmail-sendto-domain nil)
(setq smtpmail-debug-info t) ; only to debug problems
(setq smtpmail-auth-credentials
      '(("smtp1.sympatico.ca" 25 "gkamendje" "diplom99")))
(setq mail-sources '((pop :server "pop.gmx.at"
                          :user "1012889"
                          :password "diplom99")))
(add-hook 'gnus-summary-mode-hook
          (lambda ()
            (if (gnus-news-group-p gnus-newsgroup-name)
                (setq gnus-thread-sort-functions
                      '(gnus-thread-sort-by-subject
                        (not gnus-thread-sort-by-date)))
              (setq gnus-thread-sort-functions
                    '(gnus-thread-sort-by-date)))))




(add-hook 'write-file-hooks 'time-stamp)

(display-time)
(defun insert-current-date ()
  "Insert the current date in format \"dd-mm-yy\" at point."
  (interactive)
  (insert (format-time-string "%d/%m/%y" (current-time))))

(global-set-key "\C-cd" 'insert-current-date)

;(require 'gnuserv)
;(gnuserv-start)
(setq gnuserv-frame (selected-frame))
;(gnuserv-start)
;(setq gnuserv-frame (selected-frame))

;(require 'tex-site)
(load-library "desktop")
;(load-library "auc-old")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Good stuff for Spice mode

 (autoload 'spice-mode "spice-mode" "Spice/Layla Editing Mode" t)
 (setq auto-mode-alist (append (list (cons "\\.sp$" 'spice-mode)
 				       (cons "\\.cir$" 'spice-mode)
 				       (cons "\\.ckt$" 'spice-mode)
 				       (cons "\\.mod$" 'spice-mode)
 				       (cons "\\.inp$" 'spice-mode))
 				 auto-mode-alist))


;;;
;;; VHDL mode
(autoload 'vhdl-mode "vhdl-mode" "VHDL Mode" t)
(setq auto-mode-alist (cons '("\\.vhdl?\\'" . vhdl-mode) auto-mode-
alist))
;;VERILOG mode
(autoload 'verilog-mode "verilog-mode" "Verilog mode" t )
(setq auto-mode-alist (cons  '("\\.v\\'" . verilog-mode) auto-mode-
alist))
(setq auto-mode-alist (cons  '("\\.dv\\'" . verilog-mode) auto-mode-
alist))
;;TCL-MODE
(autoload 'tcl-mode "tcl" "Tcl mode." t)
(autoload 'inferior-tcl "tcl" "Run inferior Tcl process." t)
(setq auto-mode-alist (append '(("\\.tcl$" . tcl-mode)) auto-mode-
alist))
(setq auto-mode-alist (append '(("\\.do$" . tcl-mode)) auto-mode-
alist))

(add-hook 'find-file-hooks 'auto-insert)
(setq auto-insert-directory (expand-file-name "~/.autoinsert/"))
(setq auto-insert-query nil)
(define-auto-insert "\\.c\\'"         "autoinsert.c")
(define-auto-insert "\\.h\\'"         "autoinsert.h")
(define-auto-insert "\\.cpp\\'"       "autoinsert.cpp")

(define-auto-insert "\\.v\\'"         "autoinsert.v")
(define-auto-insert "\\.vhd\\'"       "autoinsert.vhd")

(define-auto-insert "\\.java\\'"      "autoinsert.java")
(define-auto-insert "\\.tex\\'"       "autoinsert.tex")
(define-auto-insert "Makefile\\'"  "Makefile.inc")
;;(define-auto-insert "[Mm]akefile\\'"  "Makefile.inc")
;(setq auto-insert-alist (cons '(("\\.c\\'" . auto-insert)
"autoinsert.c") auto-insert-alist))

;;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
;; good stuff to navigate through the buffer list using
;; shift right left


     ;; Buffer wechseln wie click auf modeline, aber mit
     ;; tasten...
     (defun kampi-previous-buffer ()
       "Hmm, to be frank, this is just the same as bury-buffer.
     Used to wander through the buffer stack with the keyboard."
       (interactive)
       (bury-buffer))
     (defun kampi-next-buffer ()
       "Cycle to the next buffer with keyboard."
       (interactive)
       (let* ((bufs (buffer-list))
     	   (entry (1- (length bufs)))
     	   val)
         (while (not (setq val (nth entry bufs)
     		      val (and (/=3D (aref (buffer-name val) 0)
     				   ? )
     			       val)))
           (setq entry (1- entry)))
           (switch-to-buffer val)))



;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
;; Buffer cycling like on modeline
;; This keymapping works only under Ms-Windows

       (define-key global-map '(shift right)
         'kampi-next-buffer)
       (define-key global-map '(shift left)
         'kampi-previous-buffer)

;; If you are running unix use instead this key mapping
       ;(define-key global-map '(shift right)
        ; (global-set-key [S-left] 'kampi-next-buffer)
       ; (define-key global-map '(shift left)
         ;(global-set-key [S-right] 'kampi-previous-buffer)


;;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;;added on july 05 2001
;;by Guy-Armand Kamendje. Let's change the fonts under W2k
(set-face-font 'default "Lucida Console:Regular:10")
(set-face-font 'modeline "MS Sans Serif:Regular:9")
;; good stuff for the fonts
;Emacs.bold.attributeFont: -dt-*-medium-i-*
;Emacs.bold.attributeForeground: hotpink

;; let's display the complete path on the window
(setq frame-title-format "%S: %f")
;;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
;; nice stuff for automatically breaking to new
;; line when we reach so far
(add-hook
 'text-mode-hook
 (function
  (lambda ()
    (auto-fill-mode t)                     ; so it break to a new line
                                           ; when you reach to far
    )))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;; USEFULL LATEX HOOKS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-hook
 'Latex-mode-hook
 (function
  (lambda ()
    (auto-fill-mode t)                     ; so it break to a new line
                                           ; when you reach to far
    )))

(add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
;; The whole customization of the TeX-command-list is in the custom.el
file
;; This hook will let C-c C-c call pdflatex instead of Latex
(add-hook 'LaTeX-mode-hook
 (function ( lambda()
   (setq TeX-command-default "pdflatex")
)))
; Tun on the flyspell mode
(defun turn-on-flyspell-mode ()
  (flyspell-mode t)
)
;; disable spell chekcing of out commented lines
(setq ispell-check-comments nil)

(add-hook 'latex-mode-hook 'turn-on-flyspell-mode)
(add-hook 'tex-mode-hook 'turn-on-flyspell-mode)
(add-hook 'html-mode-hook 'turn-on-flyspell-mode)

(add-hook 'Latex-mode-hook
	  (function
	   (lambda ()
	     (setq ispell-parser 'tex)
	     )))

;; Enable wheelmouse support by default
(if (not running-xemacs)
    (require 'mwheel) ; Emacs
  (mwheel-install) ; XEmacs
)

;; very usefull function for string replacement
;; when invoked,  all occurencies of the string "HI" will be
;; be replaced  by the string  "HA" giving control to the query
replace routine
(defun rep1 ()
(interactive)
(query-replace "hi" "ha"))
(setq line-number-mode t)
(setq column-number-mode t)
(setq make-backup-files nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=
;;;;;;;;;;
;;THE STUFF BELOW WAS ESSENTIALLY BORROWED FROM THE SAMPLE.INIT.EL
;;FILE PROVIDED WITH ANY ;;XEMACS DISTRIBUTION
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=
;;;;;;;;;;
(defun Init-safe-require (feat) "Try to REQUIRE the specified feature.
Errors occurring are silenced.  \(Perhaps in the future there will be
a way to get at the error.)  Returns t if the feature was successfully
required."  (condition-case nil (progn (require feat) t) (error nil)))

;;; ********************
;;; Put all of your autosave files in one place, instead of scattering
;;; them around the file system.  This has many advantages -- e.g. it
;;; will eliminate slowdowns caused by editing files on a slow NFS
;;; server.  (*Provided* that your home directory is local or on a
;;; fast server!  If not, pick a value for `auto-save-directory' that
;;; is fast fast fast!)
;;;
;;; Unfortunately, the code that implements this (auto-save.el) is
;;; broken on Windows prior to 21.4.
;;(unless (and (eq system-type 'windows-nt)
;;	     (not (emacs-version>=3D 21 4)))
  (setq auto-save-directory (expand-file-name "~/.autosave/")
	auto-save-directory-fallback auto-save-directory
	auto-save-hash-p nil
	efs-auto-save t
	efs-auto-save-remotely nil
	;; now that we have auto-save-timeout, let's crank this up
	;; for better interactive response.
	auto-save-interval 2000
	)
;;  )


;;; ********************
;;; Font-Lock is a syntax-highlighting package.  When it is enabled
and you
;;; are editing a program, different parts of your program will appear
in
;;; different fonts or colors.  For example, with the code below,
comments
;;; appear in red italics, function names in function definitions
appear in
;;; blue bold, etc.  The code below will cause font-lock to
automatically be
;;; enabled when you edit C, C++, Emacs-Lisp, and many other kinds of
;;; programs.
;;;
;;; The "Options" menu has some commands for controlling this as well.
;;;
(cond (running-xemacs

;; The commented-out code below is an example of setting up custom
;; font-lock colors.

;       ;; If you want the default colors, you could do this:
;       ;; (setq font-lock-use-default-fonts nil)
;       ;; (setq font-lock-use-default-colors t)
;       ;; but I want to specify my own colors, so I turn off all
;       ;; default values.
       (setq font-lock-use-default-fonts nil)
       (setq font-lock-use-default-colors nil)

       (Init-safe-require 'font-lock)

;       ;; Mess around with the faces a bit.  Note that you have
;       ;; to change the font-lock-use-default-* variables *before*
;       ;; loading font-lock, and wait till *after* loading font-lock
;       ;; to customize the faces.

;       ;; string face is green
       (set-face-foreground 'font-lock-string-face "forest green")

;       ;; comments are italic and red; doc strings are italic
       (set-face-font 'font-lock-comment-face [italic])
;       ;; Underlining comments looks terrible on tty's
       (set-face-underline-p 'font-lock-comment-face nil 'global 'tty)
       (set-face-highlight-p 'font-lock-comment-face t 'global 'tty)
       (copy-face 'font-lock-comment-face 'font-lock-doc-string-face)
       (set-face-foreground 'font-lock-comment-face "red")

;       ;; function names are bold and blue
       (set-face-font 'font-lock-function-name-face [bold])
       (set-face-foreground 'font-lock-function-name-face "blue")

;       ;; misc. faces
       (set-face-font 'font-lock-preprocessor-face [bold])
       (set-face-font 'font-lock-type-face [italic])
       (set-face-font 'font-lock-keyword-face [bold])
       ))


;;; ********************
;;; lazy-lock is a package which speeds up the highlighting of files
;;; by doing it "on-the-fly" -- only the visible portion of the
;;; buffer is fontified.  The results may not always be quite as
;;; accurate as using full font-lock or fast-lock, but it's *much*
;;; faster.  No more annoying pauses when you load files.

(if (fboundp 'turn-on-lazy-lock)
    (add-hook 'font-lock-mode-hook 'turn-on-lazy-lock))

;; I personally don't like "stealth mode" (where lazy-lock starts
;; fontifying in the background if you're idle for 30 seconds)
;; because it takes too long to wake up again.
(setq lazy-lock-stealth-time nil)


;;; ********************
;;; func-menu is a package that scans your source file for function
;;; definitions and makes a menubar entry that lets you jump to any
;;; particular function definition by selecting it from the menu.  The
;;; following code turns this on for all of the recognized languages.
;;; Scanning the buffer takes some time, but not much.
;;;
;;; Send bug reports, enhancements etc to:
;;; David Hughes <ukchugd@ukpmr.cs.philips.nl>
;;;
(cond ((and running-xemacs (Init-safe-require 'func-menu))
       (global-set-key '(shift f12) 'function-menu)
       (add-hook 'find-file-hooks 'fume-add-menubar-entry)
       (global-set-key "\C-cl" 'fume-list-functions)
       (global-set-key "\C-cg" 'fume-prompt-function-goto)

       ;; The Hyperbole information manager package uses (shift
button2) and
       ;; (shift button3) to provide context-sensitive mouse keys.  If
you
       ;; use this next binding, it will conflict with Hyperbole's
setup.
       ;; Choose another mouse key if you use Hyperbole.
       (global-set-key '(shift button3) 'mouse-function-menu)

       ;; For descriptions of the following user-customizable
variables,
       ;; type C-h v <variable>
       (setq fume-max-items 25
             fume-fn-window-position 3
             fume-auto-position-popup t
             fume-display-in-modeline-p t
             fume-menubar-menu-name
	     (if (fboundp 'submenu-generate-accelerator-spec)
		 "Function%_s" "Functions")
             fume-buffer-name "*Function List*"
             fume-no-prompt-on-valid-default nil)
       ))



     ;; Here's a sample .emacs file that might help you along the
way.  Just
     ;; copy this region and paste it into your .emacs file.  You may
want to
     ;; change some of the actual values.

     (defconst my-c-style
       '((c-tab-always-indent        . t)
         (c-comment-only-line-offset . 4)
         (c-hanging-braces-alist     . ((substatement-open after)
                                        (brace-list-open)))
         (c-hanging-colons-alist     . ((member-init-intro before)
                                        (inher-intro)
                                        (case-label after)
                                        (label after)
                                        (access-label after)))
         (c-cleanup-list             . (scope-operator
                                        empty-defun-braces
                                        defun-close-semi))
         (c-offsets-alist            . ((arglist-close . c-lineup-
arglist)
                                        (substatement-open . 0)
                                        (case-label        . 4)
                                        (block-open        . 0)
                                        (knr-argdecl-intro . -)))
         (c-echo-syntactic-information-p . t)
         )
       "My C Programming Style")

     ;; offset customizations not in my-c-style
     (setq c-offsets-alist '((member-init-intro . ++)))

     ;; Customizations for all modes in CC Mode.
     (defun my-c-mode-common-hook ()
       ;; add my personal style and set it for the current buffer
       (c-add-style "PERSONAL" my-c-style t)
       ;; other customizations
       (setq tab-width 8
             ;; this will make sure spaces are used instead of tabs
             indent-tabs-mode nil)
       ;; we like auto-newline and hungry-delete
       (c-toggle-auto-hungry-state 1)
       ;; keybindings for all supported languages.  We can put these
in
       ;; c-mode-base-map because c-mode-map, c++-mode-map, objc-mode-
map,
       ;; java-mode-map, idl-mode-map, and pike-mode-map inherit from
it.
       (define-key c-mode-base-map "\C-m" 'c-context-line-break)
       )

     (add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
;; add the Octave mode
;(autoload 'octave-mode "octave-mod" nil t)
;          (setq auto-mode-alist
;                (cons '("\\.m$" . octave-mode) auto-mode-alist))

;(add-hook 'octave-mode-hook
;                    (lambda ()
;                      (abbrev-mode 1)
;                      (auto-fill-mode 1)
;                      (if (eq window-system 'x)
;                          (font-lock-mode 1))))
;; this should always be at the end of the init file
(load "desktop")
;;(desktop-load-default)
(desktop-read)


0
nike
4/3/2008 1:04:12 PM
comp.emacs.xemacs 2750 articles. 0 followers. Post Follow

0 Replies
471 Views

Similar Articles

[PageSpeed] 49

Reply:

Similar Artilces:

(local-variables/warning) File local-variables error: Symbol's value as variable is void: compile-command
Hi I get the following error message when I start my xemacs in a directory containing a desktop file (see below). (local-variables/warning) File local-variables error: Symbol's value as variable is void: compile-command I have tried starting xemacs with -init_debug but I did not get any further info. Thanks for any hint. GA ;;;;;;;;;;;;;;;;;;;;;;;;; desktop file begins here ;; -------------------------------------------------------------------------- ;; Desktop File for Emacs ;; -------------------------------------------------------------------------- ;; Created Wed A...

File local variables and function hack-one-local-variable in files.el
I put the following at the bottom of a file of source code (True Basic, http://www.truebasic.com/) ! Local Variables: ! mode: outline ! outline-regexp:"^! @+" ! End: and got an error message about lack of the prefix "! " for the line ! outline-regexp:"^! @+" Investigating, I found that the function hack-one-local-variable in files.el was jumping to the beginning of the buffer for that file when setting the mode. My version is XEmacs 21.4 (patch 8) "Honest Recruiter (Windows [3])" [Lucid] (i586-pc-win32) of Sun Jun 16 2002 on T...

?? [Warning]...: For loop control variable must be simple local variable
I do not understand why this message: [Warning] ... : For loop control variable must be simple local variable is reported in this case (D6): unit blabla .... var k : integer; initialization for k:=0 to 5 do keyTrend[k]:=ThtmlSingleTrend.create; finalization for k:=5 downto 0 do keyTrend[k].free; end. The compiler accepts the for-loop in the initialization section. The message results from the finalization section. Tom Tom de Neef wrote: > I do not understand why this message: > > [Warning] ... : For loop control variable must be simple local varia...

local variables and global variables
Hi, How and what should be used to define a local variable and a global variable as well. and if i have used a sub-routine in a script and i want to use that sub-routine in another script, how can i do that. regards king wrote: > How and what should be used to define a local variable and a global > variable as well. In Perl variables are defined by assigments. You simply do $var = <expr>; > and if i have used a sub-routine in a script and i want to use that > sub-routine in another script, > how can i do that. You define the subroutine in a module and then impor...

How to Get Local Variables That Are Not So Local
Dear SQLers: I have written a longish script. I am up to just over 800 lines, and there is way more to come yet. In it, I define a number of stored procedures. I have test code for most of them. My script looks something like: setup database create tables and indexes repeat n times create procedure test procedure check table results end off I would like the option of easily turning off the testing. 1) I wish I could define a variable at the start of the script and check that with eac...

reference variable and local variable
I was curious and playing with pointers and references to see what's different between them. Other than the obvious ones involving C++ syntax & things like references cannot be modified with addition & subtraction, pointers can be modified, both are similar. It stated me going what are the diferrence between a reference vairable and local variable ? Here are what I can think of 1. For a local variable constructor is called, not the case for a reference variable. 2. Local variable cannot be NULL. Reference variable can point to a NULL object by a simple trick like. Employee* e = NUL...

local-variables error
Hello, I switched from 21.4.12 to 21.4.17(the newest version installed on our linux machines at work), and I am now getting the following warning: (1) (local-variables/warning) File local-variables error: Symbol's value as variable is void: compile-command As far as I can tell, I only get the warning if I open a verilog file which switches to verilog mode, then open any other type of non- verilog file, i.e. perl script, csh script. It doesn't seem to matter what is in the second file. If I just open another verilog file while already in verilog mode, I don't see the mess...

Instance Variable vs Local Variable
Hi When delegating a compareTo method for a playing card to a Comparator, I wasn't sure whether to go for the instance variable or local variable approach: public class Card implements Comparable { static class SortByValueThenSuit implements Comparator { public int compare(Object o1, Object o2) { ... } } // local variable approach public int compareTo(Object o) { return new SortByValueThenSuit().compare(this, o); } // instance variable approach private SortByValueThenSuit sorter = new SortByValueT...

Block variable & Local variable
Hi What does happen for "num" variable in this code : array = [1,2,3,4,5] x = 1 num = 1 array.each { |num| puts num*20 + x } ( after this code when I type "puts num , ruby return 5 ! why? ) -- Posted via http://www.ruby-forum.com/. |num| inside block iterates through array's items. Last item in array is 5, thus |num| value will be the one from last iteration of 'each' method. It is better to rename |num| to something else, |item| for example. ----- Eugen On 08/03/2010 11:19 AM, Amir Ebrahimifard wrote: > Hi > What does happen for &q...

Setting a .local variable named by a variable
Is there a way of setting a .local variable, using a variable as the name (or part of it) other than using Interpret as follows: interpret '.local~'db'.connection="B1"' So, if the variable "db" contained "stuff" then: Say .stuff.connection /* B1 */ -- Steve Swift http://www.swiftys.org.uk/swifty.html http://www.ringers.org.uk On Mar 10, 10:42=A0am, Swifty <steve.j.sw...@gmail.com> wrote: > Is there a way of setting a .local variable, using a variable as the > name (or part of it) other than using Interpret as follows: > > ...

Compiler warning & runtime error when copy Dwork vector value into local variable
This issue is somewhat related to another post I recently made, but since it's a different problem, I'm posting it as a separate issue. My general code setup is as follows: I have a Simulink model that contains 2 blocks: one is my main c-mex s-function code ("Block1"), discussed below, and the other is a block that generates an animation panel, which receives its values from Block1. In my c-mex s-function code, I have a Dwork vector of width 1 that is declared in the mdlInitializeSizes() function, initialized in mdlInitializeConditions, and then accessed in my mdlOutputs(...

Accessing a global variable when there is a local variable in the same name
int i = 10; int main() { int i = 20; return 0; } Hi All, I want to access the global variable i inside the main. Is there a way to do this in C? Regards, Mohan. Mohanasundaram wrote: > int i = 10; > int main() > { > int i = 20; > return 0; > } > > Hi All, > > I want to access the global variable i inside the main. Is there > a way to do this in C? By not masking it with a redeclaration inside main. On 2004-06-25, Mohanasundaram <mohanasundaram@msn.com> wrote: > int i = 10; > int main() > { > int i = 20; > retu...

Instance Variable v.s. Local Variable
What is the difference between instance variable and local variable? Is that true instance variables are shared among threads while local variable is not shared? public class Test { private String var1; // is this instance variable? public int var2; // is this also instance variable? private void method1() { String var3; // is this local variable? } } Thanks a lot! Yes your comments are correct, Instance variables are class level member variables. Local variables are defined in a method/block. Local variables are not shared amongst thread. Jerry wrote: &...

Are local variables accessible from local object methods?
Hi, C55ee on WIndows 2000 pro I have a local variable xRecordsRead LONG which I'm incrementing in one of my local classes methods. If I set a message inside the class I can see it is being incremented, but if I set a messaged outside of the class method (in the main procedure) it shows a value of 0... I thought local variables where available inside local methods.... Am I wrong? Best regards Edgard L. Riba You need to use the debugger to be absolutely sure of this. Message is too dangerous and you cannot rely on what it is telling you. If you have a locally declared var...

Web resources about - (local-variables/warning) Error in File local-variables - comp.emacs.xemacs

Local variable - Wikipedia, the free encyclopedia
In computer science , a local variable is a variable that is given local scope . Local variable references in the function or block in which ...

The Eulogy of Local Hidden Variables
... resulting “spooky action at a distance” was real, it would lead to some ground breaking implications. If John Bell [Einstein’s] local variables ...

Local hidden variable theory - Wikipedia, the free encyclopedia
In quantum mechanics , a local hidden variable theory is one in which distant events are assumed to have no instantaneous (or at least faster-than-light ...

Local hidden variable theory - Wikipedia, the free encyclopedia
In quantum mechanics , a local hidden variable theory is a hidden variable theory in which distant events are assumed to have no instantaneous ...

Non-local variable - Wikipedia, the free encyclopedia
In programming language theory , a non-local variable is a variable that is not defined in the local scope. While the term can refer to global ...

Local variable - Wikipedia, the free encyclopedia
In computer science , a local variable is a variable that is given local scope . Such a variable is accessible only from the function or block ...

Resources last updated: 1/31/2016 11:34:21 AM