Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameters to generalised prompt/edit form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00618212
Message ID:
00618841
Views:
30
>I think I guessed that. The extra set of parens (space90)) threw me off though.
>

The extra parentheses is needed in the property declaration section of a define class so that the property doesn't get set to the literal (e.g. "space(0)"). If in the property sheet, you type =space(0), (space(0)) is actually what gets ssaved in the SCX/VCX.

>I was defining some props the other day and doing conName = space(50), conTitle = space(25), etc... and began to wonder, is the amount of spaces necessary? If the prop starts out with 10 spaces and a gets set to a longer string, you don't get an error, so what's the point? Not doing it sure saves a lot of typing and looking up field lenghts in tables.
>

If working with VFP only, then you don't need really to worry about it. However, if passing information to some other environment, for example the WinAPI, you need to allocate the memory for a string yourself so you need to pass as much information as can possibly fit into it. If you don't make the string big enough, usually the DLL will throw an error or at the minimum return an error code.

>>Just wierd I guess. < s >
>
>I figured you just liked to type. <s>

Even after 13 years doing this, I am still not a touch typist (as some of my friends are). I still "hunt and peck" albeit a bit faster. I HATE TO TYPE! < bg >
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform