Subject Re: Syntax
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Fri, 28 Jul 2023 07:29:06 -0700
Newsgroups dbase.getting-started

On 7/28/2023 5:44 AM, Tom wrote:
> Good morning all,
>
> Given the following scenario ...
>
> Standard dBase form (MyForm) including the line "Set procedure to
> MyFunctions.prg additive"
>
> Standard dBase program (MyFunctions.prg) including the function
> "tsTime2cTime(tsTime)".
>
> If I copy tsTime2cTime(tsTime) function from MyFunctions.prg to
> MyForm.wfm and use the standard
>
> "form.text = class::tsTime2cTime( form.ENTRYFIELD1.value )"
>
> The function works correctly and the result is as expected.
>
> What is the proper syntax for utilizing MyFunctions.prg's
> tsTime2cTime(tsTime) function from MyForm ???

The proper syntax is to leave out the class:: reference (but also make
sure the code is not in the form, or you may confuse yourself and/or dBASE):

"form.text = tsTime2cTime( form.ENTRYFIELD1.value )"

Also note, that for some time now the keyword "additive" has not been
necessary, that's the default when using the SET PROCEDURE statement.

Ken

--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
dBASE DOS to Windows Tutorial:
http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm