Hello Scott,

You're right. I've confirmed with a compiled class.

Anyway, IMHO it's a good practice to use single quotes for a string.

Cheers,

Chanwit

2008/6/7 Scott Gray <[EMAIL PROTECTED]>:
> A string enclosed in double quotes only becomes a GString if it contains an
> ${...} expression otherwise single and double quotes are both treated as
> Strings.
> http://groovy.codehaus.org/Strings#Strings-GStrings
>
> - Scott
>
> 2008/6/7 Chanwit Kaewkasi <[EMAIL PROTECTED]>:
>
>>
>> ps. single quote is for String, while double quote is for Groovy's String.
>>
>> 2008/6/7 Scott Gray <[EMAIL PROTECTED]>:
>> > Do you mean like this:
>> > partyId = parameters.partyId;
>> > context.partyId = [Key1 : "Value1"];
>> >
>> > - Scott
>> >
>> > 2008/6/7 Ashish Vijaywargiya <[EMAIL PROTECTED]>:
>> >
>> >> Frenz ,
>> >>
>> >> Suppose I have two sentence in Beanshell file :-
>> >>
>> >> 1). context.put("partyId" , UtilMisc.toMap("Key1","Value1"));
>> >>
>> >> Key i.e partyId in the following sentence will be variable one.
>> >> 2).  partyId = parameters.get("partyId") ;
>> >> context.put(partyId , UtilMisc.topMap("Key1","Value1"));
>> >>
>> >> The converted sentence for the Beanshell statement shown above will be
>> :-
>> >>
>> >> 1) context.partyId = [Key1 : "Value1"];
>> >>
>> >> And I am confused about the second one.
>> >> Can anybody of you give some pointer on it ?
>> >>
>> >> --
>> >> Ashish Vijaywargiya
>> >>
>> >
>>
>

Reply via email to