embed CR in constant

Mike Bonner bonnmike at gmail.com
Fri Aug 28 14:23:20 EDT 2015


You could put things together with a urlencoded cr, but then any time you
use the constant you'd have to urldecode it, which is kinda silly when you
can just use a property instead.

constant myConst="test%0D%0Aing"

on mouseup
   put urldecode(myConst)
end mouseup

output:
test
ing



On Fri, Aug 28, 2015 at 10:31 AM, <dunbarx at aol.com> wrote:

> This may be a new instance of LC requiring two levels of evaluation, like
> "do" is used for in certain cases.
>
>
> Try this
>
>
> on MouseUp
>  get "A" & CR & "B"
>  constant embedCRInConstant = it
> end mouseUp
>
>
> Craig Newman
>
>
>
> -----Original Message-----
> From: Mike Kerner <MikeKerner at roadrunner.com>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Sent: Fri, Aug 28, 2015 10:48 am
> Subject: embed CR in constant
>
>
> constant embedCRInConstant = "a"&CR&"b"
>
> throws an error.  Suggestions?
>
> --
>
> On the first day, God created the heavens and the Earth
> On the second day,
> God created the oceans.
> On the third day, God put the animals on hold for a few
> hours,
>    and did a little diving.
> And God said, "This is
> good."
> _______________________________________________
> use-livecode mailing
> list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe,
> unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list