globals are just like variables in java.

-- Java 101 (not rules specific) ---
Please remember that java uses "pointers" (kinda) for objects.
If you set url to something, you are just changing that local label to point
to that literal, not its value.

THis is just standard java.

String url = "";

void doSomething(String url) {
   url = "bar"; //this does nothing, as it just changes the url to point to
"bar" value. The url outside the method is of course unchanged.
}

On 4/28/06, Demichelis Matteo <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I woud declare a variable to be used in differents rule RHS,
>
> is this "global variables" ?
>
> I tried:
>
> ...
>
> global String url;
>
>
>
> rule "Test"
>
>             when
>
>                         LHS
>
>             then
>
>                         url = "prova";
>
>
>
> but it doesnt't compile.
>
>
>
> Thank you.
>
> matteo.
>
>
>
>
>
>
>
>
>
> --------------------------------------------------------------------
>
> CONFIDENTIALITY NOTICE
>
> This message and its attachments are addressed solely to the persons above
> and may contain confidential information. If you have received the message
> in error, be informed that any use of the content hereof is prohibited.
> Please return it immediately to the sender and delete the message. Should
> you have any questions, please contact us by replying to
> [EMAIL PROTECTED]
>
>         Thank you
>
>                                         www.telecomitalia.it
>
> --------------------------------------------------------------------
>

Reply via email to