|
|
|
File-only global variable in Script-Fu? | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
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.
[Non-text portions of this message have been removed]
[Gimp Developers] [Gimp Users] [Photos] [Yosemite News] [Yosemite Photos] [Epson Inkjet] [Scanner] [Gimp's Home] [Steve's Art]
![]() |
![]() |