Question: What exactly does "DEFAULT" do/mean in the following?
// SourceFiles, convert Array to String
DEFAULT acFiles TO HB_UCHAR( 0 )
In this example what does DEFAULT do to the (array) variable acFiles?
Unfortunately I have not found any explination of this usage in the HMG help file.
Thank you for your kind help!
This usage of DEFAULT
Moderator: Rathinagiri
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: This usage of DEFAULT
hi,
if you pass a Parameter it is "expect" that it have a Value else it can crash
i you have a "default" Value you must not pass Parameter
if you pass a Parameter it is "expect" that it have a Value else it can crash
Code: Select all
FUNCTION Dummy(a)
? a // -> crash when have no Value
Code: Select all
#include "Common,ch"
FUNCTION Dummy(a)
DEFAULT a TO "hello world"
? a // -> does not crash
have fun
Jimmy
Jimmy
-
- Posts: 273
- Joined: Sat May 18, 2019 2:11 pm
- DBs Used: Visual FoxPro, FoxPro
- Location: United States of America
Re: This usage of DEFAULT
Vielen Dank! I really appreciate your prompt and kind assistance.