Re: How to write an assert in Script-Fu/Tiny-Fu?!?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Chad Jones wrote:
> I am new to scripting in the Gimp 2.4 but I have managed to pick up the 
> basics due to some good tutorials. What I didn't come across is a way to 
> create an assert function in script-fu/tiny-fu and I'm wondering how to 
> do that. To give you an idea of what I mean here's how I use it in other 
> languages like C:
> assert( BuildingHeight > 0 );

Use the 'throw' function in your Scheme version of 'assert' to raise an 
exception. Although the version of TinyScheme referenced is slightly out of 
date, more information about 'catch' and 'throw' is on the page at:


Kevin.           |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172      |"Same thing we always do, Pinkutus:
                                 |  Try to assimilate the world!"
#include <disclaimer/favourite> |              -Pinkutus & the Borg

[Index of Archives]     [Gimp Developers]     [Gimp Users]     [Yosemite News]     [Epson Inkjet Printers]     [Scanners]     [Gimp's Home]     [Steve's Art]

&hbsp; Powered by Linux