Problem with custom functions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with custom functions

Quentin Long
I'm not sure if I've exposed a horrible bug, or I've managed to completely forget something utterly bleeding obvious, or what. But whatever the deal is, I am having inordinate difficulty trying to use custom functions.

Recipe for the problem:

0--Open LiveCode (Community Edition 8.0.0, build 13018) on a MacBook Pro (13-inch, mid-2012) running OS X 10.11.5, with a 500 GB hard drive (300 GB free space) and 16GB of RAM

1--Create a new stack

2--Put this into the script of the new stack:

function CubeIt DerNum
   return (DerNum ^ 3)
end CubeIt

3--Type "put CubeIt (3)" into the message box

Expected result: "27" should show up in the message box.
Actual result: Nothing shows up in the message box.

4--Type "put CubeIt 3" into the message box
Result:
"Script compile error:
"Error description: Handler: bad command"

What the heck is going on here?
   
"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length"
   
Read the webcomic at [ http://www.atarmslength.net ]!
   
If you like "At Arm's Length", support it at [ http://www.patreon.com/DarkwingDude ].

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Problem with custom functions

Wprothero
Try putting:
Cubit(3).    In the message box, without the "put"
This messed me up for awhile too.
Bill

William Prothero
http://es.earthednet.org

> On Jul 1, 2016, at 8:03 AM, Quentin Long <[hidden email]> wrote:
>
> I'm not sure if I've exposed a horrible bug, or I've managed to completely forget something utterly bleeding obvious, or what. But whatever the deal is, I am having inordinate difficulty trying to use custom functions.
>
> Recipe for the problem:
>
> 0--Open LiveCode (Community Edition 8.0.0, build 13018) on a MacBook Pro (13-inch, mid-2012) running OS X 10.11.5, with a 500 GB hard drive (300 GB free space) and 16GB of RAM
>
> 1--Create a new stack
>
> 2--Put this into the script of the new stack:
>
> function CubeIt DerNum
>   return (DerNum ^ 3)
> end CubeIt
>
> 3--Type "put CubeIt (3)" into the message box
>
> Expected result: "27" should show up in the message box.
> Actual result: Nothing shows up in the message box.
>
> 4--Type "put CubeIt 3" into the message box
> Result:
> "Script compile error:
> "Error description: Handler: bad command"
>
> What the heck is going on here?
>
> "Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length"
>
> Read the webcomic at [ http://www.atarmslength.net ]!
>
> If you like "At Arm's Length", support it at [ http://www.patreon.com/DarkwingDude ].
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Http://es.earthednet.org
Reply | Threaded
Open this post in threaded view
|

Re: Problem with custom functions

Quentin Long
In reply to this post by Quentin Long
Follow-up on my recent "WTF!?" message. With the same hardware and OS as in my first message, but running LiveCode Community Edition 7.0.0 build 10018 rather than the 8.0.0 version, custom functions work with no anomalous behavior I can discern.

Should I file a bug report?

   
"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length"
   
Read the webcomic at [ http://www.atarmslength.net ]!
   
If you like "At Arm's Length", support it at [ http://www.patreon.com/DarkwingDude ].

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Problem with custom functions

mwieder
In reply to this post by Quentin Long
Quentin Long <cubist@...> writes:

> Recipe for the problem:
>
> 0--Open LiveCode (Community Edition 8.0.0...

> ...What the heck is going on here?

You've encountered a bug that's been fixed in more recent versions.
I can confirm the problem with 8.0.0.
Try downloading a later version.

--
 Mark Wieder
 [hidden email]





_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com