Re: [Hardhats-members] How to evoke Fileman functions.

2005-05-17 Thread whitten
I agree with all of the following, that FileMan functions generally need
to be evaluated in a FileMan context.  George Timson recently (in the last
year or so) has provided an enhancement to FileMan's Single Data Retriever
that may have a bearing on this discussion.  The field argument (the 3rd
argument to the call $$GET1^DIQ() can now be an On-the-fly Computed
Expression.  This means FileMan functions can now be evaluated in a FileMan
context, and retrieved from MUMPS code.

For example, evaluating in the context of the File #1 (file of files) and
entry # 1 (the File named FILE) the NUMDATE(TODAY) expression can be
evaluated as:

WRITE $$GET1^DIQ(1,1,,NUMDATE(TODAY)),!
05/17/05

Retrieving the current user would be:
WRITE $$GET1^DIQ(1,1,,XUSER),!
WHITTEN,DAVID J

And of course, these values can be stored in a MUMPS local variable:

SET WHEN=$$GET1^DIQ(1,1,,NOW)
WRITE WHEN,!
MAY 17,[EMAIL PROTECTED]:28:27

I hope this helps,
David Whitten
 
 Even now, it's not uncommon to define small frequently used functions
 as inline in C/C++. It has the same effect (the code is expanded inline
 
 at compile time) as an alternative to allocating a new stack frame and
 
 going through the whole call/return process. Regardless of whether or
 not this was the motivation for FM functions, it is a benefit.
 
 Gregory Woodhouse
 [EMAIL PROTECTED]
 On May 16, 2005, at 8:23 PM, Greg Kreis wrote:
 
   The FM functions are evaluated and then used to drive the generation
 
  of code, so there isn't an API available. A classic approach would
 
  have APIs and pass the parameters to them, but back in the day, code
 
  that was executed was many times faster than running a routine, if you
 
  could squeeze it all in one or two lines. I don't know that
  performance was really the reason. There was also the benefit of the
  code being stored in the DD for reuse through execution.
 
 
 Even now, it's not uncommon to define small frequently used functions
 as inline in C/C++. It has the same effect (the code is expanded
 inline at compile time) as an alternative to allocating a new stack
 frame and going through the whole call/return process. Regardless of
 whether or not this was the motivation for FM functions, it is a
 benefit.
 
 
 
 Gregory Woodhouse
 
 [EMAIL PROTECTED]
 
 On May 16, 2005, at 8:23 PM, Greg Kreis wrote:
 
 
 excerpt The FM functions are evaluated and then used to drive the
 generation of code, so there isn't an API available. A classic
 approach would have APIs and pass the parameters to them, but back in
 the day, code that was executed was many times faster than running a
 routine, if you could squeeze it all in one or two lines. I don't
 know that performance was really the reason. There was also the
 benefit of the code being stored in the DD for reuse through 
 execution./excerpt


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412alloc_id=16344op=click
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members


Re: [Hardhats-members] How to evoke Fileman functions.

2005-05-16 Thread Kevin Toppenberg
OK.  Thanks.  It would be cool if there was a bridge
(API call), but no big deal if there is not.

Thanks
Kevi

--- Greg Kreis [EMAIL PROTECTED] wrote:

 FM functions are, as the name implies, functions in
 the FM domain.  M 
 functions, on the other hand, are applicable in the
 M domain.  So forget 
 about using the FM functions in M code or M
 routines.  But, they are 
 quite handy in print, sort and input templates and
 in defining computed 
 fields (all activities in FM).
 
 Kevin Toppenberg wrote:
 
 But PRINT NUMDATE(TODAY) would crash if I put this
 into a M function (i.e. outside Fileman).  So I
 assume
 that a M function can not call these Fileman custom
 functions.  Correct?
 
 I.e, I can't do the following
 
 MyFunct(Param1)
  PRINT NUMDATE(Param1)
  quit
 
 
 Kevin
 
 
 --- Thurman Pedigo [EMAIL PROTECTED] wrote:
 
   
 
 A function can be used almost anywhere. For
 instance
 if you wanted to print
 numeric date just use the function with date
 enclosed in ():
 Like:
 PRINT NUMDATE(TODAY)
 
 Most functions will give you format and use.
 Probably my two most common
 functions are NUMDATE and SETDATA. Then you can
 make
 your own. 
 SETDATA(FIELD1,FIELD2) sets FIELD1=FIELD2 OR
 SETDATA(FIELD1,FIELD2+12) and
 almost any expression you desire can be executed.
 Functions made me the lazy
 programmer I am today. Most users think of
 functions
 in a print statement.
 However, they can be used in triggers and almost
 any
 place you can specify a
 field.  ...tx/t
 
 NAME: NUMDATE//
 MUMPS CODE: S:X
 X=$E(X,4,5)_/_$E(X,6,7)_/_$E(X,2,3)
Replace
 EXPLANATION: DATE IN 'NN/NN/NN' FORMAT//
 DATE-VALUED:
 NUMBER OF ARGUMENTS:
 WORD-PROCESSING: 
 
 NAME: SETDATA//
 MUMPS CODE: S X1=X//
 EXPLANATION: SETS FIRST ARGUMENT EQUAL TO THE
 SECOND
 ARGUMENT
Replace
 DATE-VALUED:
 NUMBER OF ARGUMENTS: 2//
 WORD-PROCESSING:
 
 
 
 -Original Message-
 From:
 [EMAIL PROTECTED]
   
 
 [mailto:hardhats-
 
 
 [EMAIL PROTECTED] On Behalf Of
   
 
 Kevin Toppenberg
 
 
 Sent: Sunday, May 15, 2005 3:59 PM
 To: Hardhats Sourceforge
 Subject: [Hardhats-members] How to evoke Fileman
   
 
 functions.
 
 
 I just stumbled across the concept of creating
   
 
 Fileman
 
 
 functions.  These are stored in file FUNCTION. 
   
 
 But
 
 
 I can't figure out how to evoke them.
 
 Are they functions that one would use in an
 input/output transform, or would one use them in
 creating programs?
 
 Thanks
 Kevin
 
 

__
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
   
 
 protection around
 
 
 http://mail.yahoo.com
 
 
 
   
 

---
   
 
 This SF.Net email is sponsored by Oracle Space
   
 
 Sweepstakes
 
 
 Want to be the first software developer in space?
 Enter now for the Oracle Space Sweepstakes!
 
   
 

http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
   
 
 ___
 Hardhats-members mailing list
 Hardhats-members@lists.sourceforge.net
 
   
 

https://lists.sourceforge.net/lists/listinfo/hardhats-members
   
 
 
 
 
 

---
   
 
 This SF.Net email is sponsored by Oracle Space
 Sweepstakes
 Want to be the first software developer in space?
 Enter now for the Oracle Space Sweepstakes!
 
 
 

http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
   
 
 ___
 Hardhats-members mailing list
 Hardhats-members@lists.sourceforge.net
 
 
 

https://lists.sourceforge.net/lists/listinfo/hardhats-members
   
 
 
 
 
  
 __ 
 Do you Yahoo!? 
 Yahoo! Mail - Helps protect you from nasty viruses.
 
 http://promotions.yahoo.com/new_mail
 
 

---
 This SF.Net email is sponsored by Oracle Space
 Sweepstakes
 
=== message truncated ===




__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412alloc_id=16344op=click
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members


RE: [Hardhats-members] How to evoke Fileman functions.

2005-05-16 Thread Thurman Pedigo
Don't think that will work. The functions operate on FileMan fields. There
isn't much need if you are sending code, just store it as a routine and call
it. I am don't use (or know) param so I could be wrong here. The print
command to which I referred is a single print statement inside a print call.
For instance:
OUTPUT FROM WHAT FILE: MAW DOT//
SORT BY: DOTID// @DOTID
START WITH DOTID: FIRST//
  WITHIN DOTID, SORT BY:
FIRST PRINT FIELD: DOT DATE
THEN PRINT FIELD: NUMDATE(DOT DATE)
THEN PRINT FIELD: SETDATA(WORKFLD,NUMDATE(DOT DATE))
THEN PRINT FIELD: WORKFLD
THEN PRINT FIELD:
APR 23,2001  04/23/01
  04/23/01
APR 25,2001  04/25/01
  04/25/01 

Someone with experience param may clarify how it could work. My work with
functions has been limited to fields. You can use functions to execute code,
that's actually what happens when a function is called. Functions are also
great for sending control codes to printers. ...tx/t


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:hardhats-
 [EMAIL PROTECTED] On Behalf Of Kevin Toppenberg
 Sent: Sunday, May 15, 2005 6:31 PM
 To: hardhats-members@lists.sourceforge.net
 Subject: RE: [Hardhats-members] How to evoke Fileman functions.
 
 But PRINT NUMDATE(TODAY) would crash if I put this
 into a M function (i.e. outside Fileman).  So I assume
 that a M function can not call these Fileman custom
 functions.  Correct?
 
 I.e, I can't do the following
 
 MyFunct(Param1)
  PRINT NUMDATE(Param1)
  quit
 
 
 Kevin
 
 
 --- Thurman Pedigo [EMAIL PROTECTED] wrote:
 
  A function can be used almost anywhere. For instance
  if you wanted to print
  numeric date just use the function with date
  enclosed in ():
  Like:
  PRINT NUMDATE(TODAY)
 
  Most functions will give you format and use.
  Probably my two most common
  functions are NUMDATE and SETDATA. Then you can make
  your own.
  SETDATA(FIELD1,FIELD2) sets FIELD1=FIELD2 OR
  SETDATA(FIELD1,FIELD2+12) and
  almost any expression you desire can be executed.
  Functions made me the lazy
  programmer I am today. Most users think of functions
  in a print statement.
  However, they can be used in triggers and almost any
  place you can specify a
  field.  ...tx/t
 
  NAME: NUMDATE//
  MUMPS CODE: S:X
  X=$E(X,4,5)_/_$E(X,6,7)_/_$E(X,2,3)
 Replace
  EXPLANATION: DATE IN 'NN/NN/NN' FORMAT//
  DATE-VALUED:
  NUMBER OF ARGUMENTS:
  WORD-PROCESSING:
 
  NAME: SETDATA//
  MUMPS CODE: S X1=X//
  EXPLANATION: SETS FIRST ARGUMENT EQUAL TO THE SECOND
  ARGUMENT
 Replace
  DATE-VALUED:
  NUMBER OF ARGUMENTS: 2//
  WORD-PROCESSING:
 
   -Original Message-
   From: [EMAIL PROTECTED]
  [mailto:hardhats-
   [EMAIL PROTECTED] On Behalf Of
  Kevin Toppenberg
   Sent: Sunday, May 15, 2005 3:59 PM
   To: Hardhats Sourceforge
   Subject: [Hardhats-members] How to evoke Fileman
  functions.
  
   I just stumbled across the concept of creating
  Fileman
   functions.  These are stored in file FUNCTION.
  But
   I can't figure out how to evoke them.
  
   Are they functions that one would use in an
   input/output transform, or would one use them in
   creating programs?
  
   Thanks
   Kevin
  
  
   __
   Do You Yahoo!?
   Tired of spam?  Yahoo! Mail has the best spam
  protection around
   http://mail.yahoo.com
  
  
  
 
 ---
   This SF.Net email is sponsored by Oracle Space
  Sweepstakes
   Want to be the first software developer in space?
   Enter now for the Oracle Space Sweepstakes!
  
 
 http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
   ___
   Hardhats-members mailing list
   Hardhats-members@lists.sourceforge.net
  
 
 https://lists.sourceforge.net/lists/listinfo/hardhats-members
 
 
 
 
 ---
  This SF.Net email is sponsored by Oracle Space
  Sweepstakes
  Want to be the first software developer in space?
  Enter now for the Oracle Space Sweepstakes!
 
 http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
  ___
  Hardhats-members mailing list
  Hardhats-members@lists.sourceforge.net
 
 https://lists.sourceforge.net/lists/listinfo/hardhats-members
 
 
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail - Helps protect you from nasty viruses.
 http://promotions.yahoo.com/new_mail
 
 
 ---
 This SF.Net email is sponsored by Oracle Space Sweepstakes
 Want to be the first software developer in space?
 Enter now for the Oracle Space Sweepstakes!
 http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
 ___
 Hardhats-members mailing list
 Hardhats-members@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/hardhats-members



---
This SF.Net email is sponsored by Oracle Space Sweepstakes

Re: [Hardhats-members] How to evoke Fileman functions.

2005-05-16 Thread Greg Kreis




The FM functions are evaluated and then used to drive the generation of
code, so there isn't an API available. A classic approach would have
APIs and pass the parameters to them, but back in the day, code that
was executed was many times faster than running a routine, if you could
squeeze it all in one or two lines. I don't know that performance was
really the reason. There was also the benefit of the code being stored
in the DD for reuse through execution.

Kevin Toppenberg wrote:

  OK.  Thanks.  It would be cool if there was a bridge
(API call), but no big deal if there is not.

Thanks
Kevi

--- Greg Kreis [EMAIL PROTECTED] wrote:

  
  
FM functions are, as the name implies, functions in
the FM domain.  M 
functions, on the other hand, are applicable in the
M domain.  So forget 
about using the FM functions in M code or M
routines.  But, they are 
quite handy in print, sort and input templates and
in defining computed 
fields (all activities in FM).

Kevin Toppenberg wrote:



  But PRINT NUMDATE(TODAY) would crash if I put this
into a M function (i.e. outside Fileman).  So I
  

assume


  that a M function can not call these Fileman custom
functions.  Correct?

I.e, I can't do the following

MyFunct(Param1)
PRINT NUMDATE(Param1)
quit


Kevin


--- Thurman Pedigo [EMAIL PROTECTED] wrote:

 

  
  
A function can be used almost anywhere. For

  

instance


  
if you wanted to print
numeric date just use the function with date
enclosed in ():
Like:
PRINT NUMDATE(TODAY)

Most functions will give you format and use.
Probably my two most common
functions are NUMDATE and SETDATA. Then you can

  

make


  
your own. 
SETDATA(FIELD1,FIELD2) sets FIELD1=FIELD2 OR
SETDATA(FIELD1,FIELD2+12) and
almost any _expression_ you desire can be executed.
Functions made me the lazy
programmer I am today. Most users think of

  

functions


  
in a print statement.
However, they can be used in triggers and almost

  

any


  
place you can specify a
field.  ...tx/t

NAME: NUMDATE//
MUMPS CODE: S:X
X=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)
  Replace
EXPLANATION: DATE IN 'NN/NN/NN' FORMAT//
DATE-VALUED:
NUMBER OF ARGUMENTS:
WORD-PROCESSING: 

NAME: SETDATA//
MUMPS CODE: S X1=X//
EXPLANATION: SETS FIRST ARGUMENT EQUAL TO THE

  

SECOND


  
ARGUMENT
  Replace
DATE-VALUED:
NUMBER OF ARGUMENTS: 2//
WORD-PROCESSING:

   



  -Original Message-
From:
  

  

[EMAIL PROTECTED]


  

   

  

[mailto:hardhats-
   



  [EMAIL PROTECTED]] On Behalf Of
 

  

Kevin Toppenberg
   



  Sent: Sunday, May 15, 2005 3:59 PM
To: Hardhats Sourceforge
Subject: [Hardhats-members] How to evoke Fileman
 

  

functions.
   



  I just stumbled across the concept of creating
 

  

Fileman
   



  functions.  These are stored in file "FUNCTION". 
 

  

But
   



  I can't figure out how to evoke them.

Are they functions that one would use in an
input/output transform, or would one use them in
creating programs?

Thanks
Kevin


  

  


  
__


  Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
 

  

protection around
   



  http://mail.yahoo.com



 

  

  

---


   

  
  

  This SF.Net email is sponsored by Oracle Space
 

  

Sweepstakes
   



  Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!

 

  

  

http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click


   

  
  

  ___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net

 

  

  

https://lists.sourceforge.net/lists/listinfo/hardhats-members


   

  
  

   


  

---


   

  
  
This SF.Net email is sponsored by Oracle Space
Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!

   


  


Re: [Hardhats-members] How to evoke Fileman functions.

2005-05-16 Thread Gregory Woodhouse
Even now, it's not uncommon to define small frequently used functions as inline in C/C++. It has the same effect (the code is expanded inline at compile time) as an alternative to allocating a new stack frame and going through the whole call/return process. Regardless of whether or not this was the motivation for FM functions, it is a benefit.


Gregory Woodhouse
[EMAIL PROTECTED]
On May 16, 2005, at 8:23 PM, Greg Kreis wrote:

The FM functions are evaluated and then used to drive the generation of code, so there isn't an API available.  A classic approach would have APIs and pass the parameters to them, but back in the day, code that was executed was many times faster than running a routine, if you could squeeze it all in one or two lines.   I don't know that performance was really the reason.  There was also the benefit of the code being stored in the DD for reuse through execution.

RE: [Hardhats-members] How to evoke Fileman functions.

2005-05-15 Thread Thurman Pedigo
A function can be used almost anywhere. For instance if you wanted to print
numeric date just use the function with date enclosed in ():
Like:
PRINT NUMDATE(TODAY)

Most functions will give you format and use. Probably my two most common
functions are NUMDATE and SETDATA. Then you can make your own. 
SETDATA(FIELD1,FIELD2) sets FIELD1=FIELD2 OR SETDATA(FIELD1,FIELD2+12) and
almost any expression you desire can be executed. Functions made me the lazy
programmer I am today. Most users think of functions in a print statement.
However, they can be used in triggers and almost any place you can specify a
field.  ...tx/t

NAME: NUMDATE//
MUMPS CODE: S:X X=$E(X,4,5)_/_$E(X,6,7)_/_$E(X,2,3)
   Replace
EXPLANATION: DATE IN 'NN/NN/NN' FORMAT//
DATE-VALUED:
NUMBER OF ARGUMENTS:
WORD-PROCESSING: 

NAME: SETDATA//
MUMPS CODE: S X1=X//
EXPLANATION: SETS FIRST ARGUMENT EQUAL TO THE SECOND ARGUMENT
   Replace
DATE-VALUED:
NUMBER OF ARGUMENTS: 2//
WORD-PROCESSING:

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:hardhats-
 [EMAIL PROTECTED] On Behalf Of Kevin Toppenberg
 Sent: Sunday, May 15, 2005 3:59 PM
 To: Hardhats Sourceforge
 Subject: [Hardhats-members] How to evoke Fileman functions.
 
 I just stumbled across the concept of creating Fileman
 functions.  These are stored in file FUNCTION.  But
 I can't figure out how to evoke them.
 
 Are they functions that one would use in an
 input/output transform, or would one use them in
 creating programs?
 
 Thanks
 Kevin
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com
 
 
 ---
 This SF.Net email is sponsored by Oracle Space Sweepstakes
 Want to be the first software developer in space?
 Enter now for the Oracle Space Sweepstakes!
 http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
 ___
 Hardhats-members mailing list
 Hardhats-members@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/hardhats-members



---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members


RE: [Hardhats-members] How to evoke Fileman functions.

2005-05-15 Thread Kevin Toppenberg
But PRINT NUMDATE(TODAY) would crash if I put this
into a M function (i.e. outside Fileman).  So I assume
that a M function can not call these Fileman custom
functions.  Correct?

I.e, I can't do the following

MyFunct(Param1)
 PRINT NUMDATE(Param1)
 quit


Kevin


--- Thurman Pedigo [EMAIL PROTECTED] wrote:

 A function can be used almost anywhere. For instance
 if you wanted to print
 numeric date just use the function with date
 enclosed in ():
 Like:
 PRINT NUMDATE(TODAY)
 
 Most functions will give you format and use.
 Probably my two most common
 functions are NUMDATE and SETDATA. Then you can make
 your own. 
 SETDATA(FIELD1,FIELD2) sets FIELD1=FIELD2 OR
 SETDATA(FIELD1,FIELD2+12) and
 almost any expression you desire can be executed.
 Functions made me the lazy
 programmer I am today. Most users think of functions
 in a print statement.
 However, they can be used in triggers and almost any
 place you can specify a
 field.  ...tx/t
 
 NAME: NUMDATE//
 MUMPS CODE: S:X
 X=$E(X,4,5)_/_$E(X,6,7)_/_$E(X,2,3)
Replace
 EXPLANATION: DATE IN 'NN/NN/NN' FORMAT//
 DATE-VALUED:
 NUMBER OF ARGUMENTS:
 WORD-PROCESSING: 
 
 NAME: SETDATA//
 MUMPS CODE: S X1=X//
 EXPLANATION: SETS FIRST ARGUMENT EQUAL TO THE SECOND
 ARGUMENT
Replace
 DATE-VALUED:
 NUMBER OF ARGUMENTS: 2//
 WORD-PROCESSING:
 
  -Original Message-
  From: [EMAIL PROTECTED]
 [mailto:hardhats-
  [EMAIL PROTECTED] On Behalf Of
 Kevin Toppenberg
  Sent: Sunday, May 15, 2005 3:59 PM
  To: Hardhats Sourceforge
  Subject: [Hardhats-members] How to evoke Fileman
 functions.
  
  I just stumbled across the concept of creating
 Fileman
  functions.  These are stored in file FUNCTION. 
 But
  I can't figure out how to evoke them.
  
  Are they functions that one would use in an
  input/output transform, or would one use them in
  creating programs?
  
  Thanks
  Kevin
  
  
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
  
  
 

---
  This SF.Net email is sponsored by Oracle Space
 Sweepstakes
  Want to be the first software developer in space?
  Enter now for the Oracle Space Sweepstakes!
 

http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
  ___
  Hardhats-members mailing list
  Hardhats-members@lists.sourceforge.net
 

https://lists.sourceforge.net/lists/listinfo/hardhats-members
 
 
 

---
 This SF.Net email is sponsored by Oracle Space
 Sweepstakes
 Want to be the first software developer in space?
 Enter now for the Oracle Space Sweepstakes!

http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
 ___
 Hardhats-members mailing list
 Hardhats-members@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/hardhats-members
 




__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members


Re: [Hardhats-members] How to evoke Fileman functions.

2005-05-15 Thread Greg Kreis




FM functions are, as the name implies, functions in the FM domain. M
functions, on the other hand, are applicable in the M domain. So
forget about using the FM functions in M code or M routines. But, they
are quite handy in print, sort and input templates and in defining
computed fields (all activities in FM).

Kevin Toppenberg wrote:

  But PRINT NUMDATE(TODAY) would crash if I put this
into a M function (i.e. outside Fileman).  So I assume
that a M function can not call these Fileman custom
functions.  Correct?

I.e, I can't do the following

MyFunct(Param1)
 PRINT NUMDATE(Param1)
 quit


Kevin


--- Thurman Pedigo [EMAIL PROTECTED] wrote:

  
  
A function can be used almost anywhere. For instance
if you wanted to print
numeric date just use the function with date
enclosed in ():
Like:
PRINT NUMDATE(TODAY)

Most functions will give you format and use.
Probably my two most common
functions are NUMDATE and SETDATA. Then you can make
your own. 
SETDATA(FIELD1,FIELD2) sets FIELD1=FIELD2 OR
SETDATA(FIELD1,FIELD2+12) and
almost any _expression_ you desire can be executed.
Functions made me the lazy
programmer I am today. Most users think of functions
in a print statement.
However, they can be used in triggers and almost any
place you can specify a
field.  ...tx/t

NAME: NUMDATE//
MUMPS CODE: S:X
X=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)
   Replace
EXPLANATION: DATE IN 'NN/NN/NN' FORMAT//
DATE-VALUED:
NUMBER OF ARGUMENTS:
WORD-PROCESSING: 

NAME: SETDATA//
MUMPS CODE: S X1=X//
EXPLANATION: SETS FIRST ARGUMENT EQUAL TO THE SECOND
ARGUMENT
   Replace
DATE-VALUED:
NUMBER OF ARGUMENTS: 2//
WORD-PROCESSING:



  -Original Message-
From: [EMAIL PROTECTED]
  

[mailto:hardhats-


  [EMAIL PROTECTED]] On Behalf Of
  

Kevin Toppenberg


  Sent: Sunday, May 15, 2005 3:59 PM
To: Hardhats Sourceforge
Subject: [Hardhats-members] How to evoke Fileman
  

functions.


  I just stumbled across the concept of creating
  

Fileman


  functions.  These are stored in file "FUNCTION". 
  

But


  I can't figure out how to evoke them.

Are they functions that one would use in an
input/output transform, or would one use them in
creating programs?

Thanks
Kevin


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
  

protection around


  http://mail.yahoo.com



  

  
  ---
  
  

  This SF.Net email is sponsored by Oracle Space
  

Sweepstakes


  Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!

  

  
  http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
  
  

  ___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net

  

  
  https://lists.sourceforge.net/lists/listinfo/hardhats-members
  
  




  
  ---
  
  
This SF.Net email is sponsored by Oracle Space
Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!


  
  http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
  
  
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net


  
  https://lists.sourceforge.net/lists/listinfo/hardhats-members
  
  


		
__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

  


-- 
Greg Kreis  http://www.PioneerDataSys.com

"You are today where your thoughts have brought you, you will
   be tomorrow where your thoughts take you." (James Lane Allen)