Fwd: File-only global variable in Script-Fu? | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Nobody replied to my last email so I was hoping if I posted it again I might get a response. Thanks. :)
Chad Jones <chadsspameateremail@xxxxxxxxx> wrote: Date: Wed, 2 Jan 2008 14:59:13 -0800 (PST)
From: Chad Jones <chadsspameateremail@xxxxxxxxx>
Subject: File-only global variable in Script-Fu?
To: script-fu@xxxxxxxxxxxxxxx
I have been using Script-fu within the Gimp recently and it has turned out quite nicely. Though today a question came up that I wanted to ask. If I want to create a file global variable or constant which is global to that file but not viewable outside that file what is the recommended way of doing this? In C I would use "static int InternalPadding = 10;" the static making it global to that file only and not viewable outside. But I don't know how to do this in Script-fu. What is the recommended way of doing this?
I have come across Pedro Gimeno's "Local Functions in Script-Fu" solution which includes wrapping the entire script-fu file in a let* statement. I know this could be used to make variables local to that file. The page is listed here:
http://www.formauri.es/personal/pgimeno/gimp/gimp.html
Though is this the recommended way of doing this? Perhaps there is another better method I am overlooking? Also, I know define will define a variable which is global but is this something which will continue going forward in Script-fu?
Thanks for insights and answers to my questions. :)
Chad.
---------------------------------
Never miss a thing. Make Yahoo your homepage.
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
[Non-text portions of this message have been removed]
[Gimp Developers] [Gimp Users] [Photos] [Yosemite News] [Yosemite Photos] [Epson Inkjet] [Scanner] [Gimp's Home] [GIMP Books] [Steve's Art]
![]() |
![]() |