[Gambas-user] did I miss something, or is that a bug

Jussi Lahtinen jussi.lahtinen at ...626...
Sun Feb 14 20:47:30 CET 2010


"AS Variant"
OK, didn't notice...
Seems that you have worked your problem out!

Jussi



On Sun, Feb 14, 2010 at 21:42, Charlie Reinl <Karl.Reinl at ...9...> wrote:
> Am Sonntag, den 14.02.2010, 20:30 +0200 schrieb Jussi Lahtinen:
>> It works perfectly without eval.
>> Print "/tmp/testArchivCopy_" & Format(Date(), "yyyymmdd") &
>> Replace(CStr(Time()), ":", "") & ".pdf"
>> Result: /tmp/testArchivCopy_20100214202540.428.pdf
>>
>> Eval is only for math! Like Eval("1+2") or Eval("1/sqr(eo*uo)", cExpr).
>>
>> Jussi
>>
>>
>> On Sun, Feb 14, 2010 at 20:20, Charlie Reinl <Karl.Reinl at ...9...> wrote:
>> > Am Sonntag, den 14.02.2010, 20:00 +0200 schrieb Jussi Lahtinen:
>> >> > I try to work with a string in that case a Path and eval tries to
>> >> > divide.
>> >>
>> >>  Sorry, I still don't understand what you are trying to do.
>> >>  Eval tries to divide, that is very much expected.
>> >>
>> >>  "? eval("/tmp/testArchivCopy.pdf")"
>> >>  Doesn't make any sense, "/tmp/testArchivCopy.pdf" is not mathematical
>> >> expression.
>> >>  What is the result you are expecting?
>> >>
>> >>
>> >> http://gambasdoc.org/help/lang/eval
>> >> "Evaluates an expression and returns its value."
>> >>
>> >>
>> >> Jussi
>> >
>> > Salut Jussi,
>> >
>> > the original is:
>> > ? eval("/tmp/testArchivCopy_" & Format(Date(), "yyyymmdd") &
>> > Replace(CStr(Time()), ":", "") & ".pdf")
>> >
>> > that was the last in the first mail. And I expect something like :
>> > "/tmp/testArchivCopy_20100214130107.408.pdf"
>> >
>> >
>> > --
>> > Amicalement
>> > Charlie
>> >
> Salut Jussi,
>
> no, not only for math, even at http://gambasdoc.org/help/lang/eval
> it is shown.
>
> And that works :
>  gbx2 -e "Format(Date(), \"yyyymmdd\")"
>
>  gbx2 -e "iif(1=2,True,False)"
>
>  gbx2 -e "\"/tmp/testArchivCopy_\" & Format(Date(), \"yyyymmdd\")"
>
> I have to pass it as a String, if not the / is seen as the math /.
>
> Thanks anyway.
> Charlie
>
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list