Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

Journaling Examples


As an example of Journaling in IDL, consider the following IDL statements:

;Start journaling to file demo.pro: 
JOURNAL, 'demo.pro'  
;Prompt for input: 
PRINT, 'Enter a number:' 
;Read the user response into variable Z: 
READ, Z 
;Send an IDL comment to the journal file using JOURNAL: 
JOURNAL, '; This was inserted with JOURNAL.' 
;Send another comment using PRINTF: 
PRINTF, !JOURNAL, '; This was inserted with PRINTF.' 
;End journaling: 
JOURNAL 

If these statements are executed by a user named Doug on a Sun workstation named quixote, the resulting journal file demo.pro will look like the following:

; IDL Version 5.3 (sunos sparc) 
; Journal File for doug@quixote 
; Working directory: /home/doug/IDL 
; Date: Mon Sept 9 14:38:24 1999 
  
PRINT, 'Enter a number:' 
;Enter a number: 
READ, Z 
; 87 
; This was inserted with JOURNAL. 
; This was inserted with PRINTF. 
PRINTF, !JOURNAL, '; This was inserted with PRINTF.' 

Note that the input data to the READ statement is shown as a comment. In addition, the statement to insert the text using JOURNAL does not appear, while the statement using PRINTF does appear.


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]