About omitted params in 4D commands...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

About omitted params in 4D commands...

4D Tech mailing list
I was just reading a KB tech tip <http://kb.4d.com/assetid=77524> on OBJECT
DUPLICATE. I started using OD in v13 and really hadn't looked at the docs
for a while. The tech tip is showing how to control the level (or z-axis)
of a duplicated object. Handy, but not my point here.

The thing I was how tolerant the command is to omitted params. Here's the
syntax:

OBJECT DUPLICATE ( {* ;} object {; newName {; newVar {; boundTo {; moveH {;
moveV {; resizeH {; resizeV}}}}}}} {; *} )

I have ingrained in me the notion that if I want to pass the 'boundTo'
param but I'm not using variables I'll need to pass something like $nil in
the 'newVar' position. But the tech tip illustrates that I don't by using
this:

OBJECT DUPLICATE(*;"button";"button"+String($i);"button";($i*25);($i*25))

The 'newVar' param is just omitted. Huh?

So, is this a convention that's always existed and I just missed? Or is
this a feature of this particular command? I've got assume it can only work
when the params are unique types. In this case there's only one pointer so
that's pretty easy.

I'm not complaining - just want to understand how this works.

--
Kirk Brooks
San Francisco, CA
=======================

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************