Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Global Variables

 [1/7] from: office::thousand-hills::net at: 30-Oct-2001 11:00


Is it possible to write global variables or global functions and call them from other scripts? //john

 [2/7] from: tim:johnsons-web at: 30-Oct-2001 8:12


On Tue, Oct 30, 2001 at 11:00:03AM -0600, office wrote:
> Is it possible to write global variables or global functions and call them > from other scripts? > > //john
Hello John: Perhaps you mean to "import" a "library" file as in do %stdlib.r now 'html-newline becomes a global variable. I am referring specifically to script files that I (believe) I sent you. You may then make a global "constant" by protect 'htm-newline Is this what you are looking for? -- Tim Johnson <[tim--johnsons-web--com]> http://www.johnsons-web.com

 [3/7] from: office:thousand-hills at: 30-Oct-2001 13:12


Tim: I'm not sophisticated enough in REBOL to know how to articulate this. I have a lot of really great scripts and want to make some of the "Functions" usable without actually re coding the scripts. It would also be handy to change things like attributes in one place as well. For example, I use a REBOL script to name files with a standard sorting file name based on date_time sent to the directory and the names look like something like this: 2001_1030_Tuesday_12:49PM_.txt The code is in a function called fmt_time: in a file named fmt_time.r I would like to be able to call that routine from within any script with a call, ie.. fmt_time cgi/2 (without adding the code into the same file) Can you give me the steps to accomplish this? Do I need to make these changes from the console, can they be done by running a file, will I need to rerun the file after booting? Thanks.. John At 08:12 AM 10/30/2001 -0900, you wrote:

 [4/7] from: office:thousand-hills at: 30-Oct-2001 13:37


Ok, TIM: It worked.!!!!! Thanks.. Now my understanding (lights on) is that I can develop a library with a list of favorite and standard functions, and call them at will, as long as I call DO %LIBRARY.R first.. Correct? John At 08:12 AM 10/30/2001 -0900, you wrote:

 [5/7] from: tim:johnsons-web at: 30-Oct-2001 11:16


On Tue, Oct 30, 2001 at 01:37:21PM -0600, office wrote:
> Ok, TIM: > > It worked.!!!!! Thanks.. > > Now my understanding (lights on) is that I can develop a library with a > list of favorite and standard functions, and call them at will, as long as > I call DO %LIBRARY.R first.. > > Correct?
In a word... yes.
> John > At 08:12 AM 10/30/2001 -0900, you wrote:
<<quoted lines omitted: 26>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.johnsons-web.com

 [6/7] from: tim:johnsons-web at: 30-Oct-2001 11:16


Hi John: I have to leave my office as I write. When I return, I will monitor the list to see whether you have received adequate answers. (It is likely that you will by then have received information from more experienced rebol programmers than I... :>) ) Regards On Tue, Oct 30, 2001 at 01:12:40PM -0600, office wrote:
> Tim: > I'm not sophisticated enough in REBOL to know how to articulate this. I
<<quoted lines omitted: 42>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.johnsons-web.com

 [7/7] from: office:thousand-hills at: 2-Nov-2001 18:14


Thanks for the help. I broke "new Ground" well at least for me, with GLOBAL VARIABLES without calling files with "Do" command.. Global variables that auto run in REBOL. This software is slick. John

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted