My second function

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

My second function

Post by bjb007 » Sun Feb 24, 2008 11:52 pm

I've copied working code from a button
script and put it in the stack script.

It has no parameters.

It won't work unless I give it a parameter
to pass. Seems any variable will do.

The docs state that a function can have
no parameters but seems this isn't so.

Comment anyone?
Life is just a bowl of cherries.

Mark Smith
Posts: 179
Joined: Sat Apr 08, 2006 11:08 pm
Contact:

Post by Mark Smith » Mon Feb 25, 2008 3:41 am

Could you post the code?

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Mon Feb 25, 2008 10:15 pm

without any code to answer all I can say is I am happiely using functions without params. You still need the parans in the call though

put myFunction() into myVar

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

My second function

Post by bjb007 » Wed Feb 27, 2008 8:59 am

Malte

"I am happily using functions without params.
You still need the params in the call though".

If a function requires no params how do you use
params in the function call?

Seems to be what I did - just put in any variable as
a param get the function called.

Without something as a param the function
call is skipped over in the debugger. With a param
given (even though the param isn't needed by the
function) the debugger goes into the function and
processes the code.

Not what I consider conforming to the info in the
help file which states that a function can have no
parameters.
Life is just a bowl of cherries.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Feb 27, 2008 1:41 pm

bjb007,

Please, post your scripts.

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Wed Feb 27, 2008 6:27 pm

*nod*

No go without seeing the scripts

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Thu Feb 28, 2008 2:45 pm

WE WANT SCRIPTS!
WE WANT SCRIPTS!
WE WANT SCRIPTS!
WE WANT SCRIPTS!
WE WANT SCRIPTS!

:D

Post Reply