Re: [api-dev] How do I generate an Error?

2005-12-19 Thread Dieter Krogh - Sun Germany

Hi Felix,

I'm afraid exception throwing is not available in OpenOffice Basic.

So you will have to define the error numbers and messages by yourself. 
In tiny programming projects it might be useful to hard code them, in 
larger projects I would suggest to have a file where numbers and 
messages are listed.


HTH

Dieter


Felix E. Klee wrote On 12/16/05 12:57,:
In the online documentation and in a book that I have at hand (Open Office 
Programmierung by Rene Martin) I find explanation for handling errors.  But, 
what I'd like to know is:


* How can I let my code *generate* errors?

* If generating errors manually is possible, how do I set the error number and
  the error message?



--

  Dieter Krogh

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Integer Division?

2005-12-14 Thread Dieter Krogh - Sun Germany

Hi Felix,

does

   Dim iResult as integer
   iResult = 11 \ 3

fit your needs?

The \ operator would do the division with a whole number result.

BTW, 11 / 3 would never result as 4. ;-)

Best wishes
Dieter

Felix E. Klee wrote On 12/14/05 11:26,:

How do I perform an integer division (e.g. 11 / 3 = 4) in OpenOffice Basic?



--

  Dieter Krogh
  Support Engineer RSD StarOffice/Linux/Cobalt EMEA

  Sun Services   Tel:  (+49 40) 23646-744 / x66744
  Sun Microsystems GmbH  Fax:  (+49 40) 23646-750
  Sachsenfeld 4  http://www.sun.de
  D-20097 Hamburgmailto:[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]