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 »

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 »

Could you post the code?
malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte »

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 »

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 »

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 »

*nod*

No go without seeing the scripts
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus »

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

:D
Post Reply