How can I use xHarbour Functions?

How can I use xHarbour Functions?

Postby dutch » Tue Apr 14, 2009 5:39 pm

Dear All,

I've found the function of xHarbour in xHarbour\tests folder but I cannot use it with FWH? Why?

I try following code but it shows error function EOM(). What's wrong?
Code: Select all  Expand view
#include 'fivewin.ch'
function main
msginfo( eom( date() ) )
return nil 


xHarbour's Date Function
Code: Select all  Expand view
/*
 * $Id: dates4.prg,v 1.1.1.1 2001/12/21 10:45:42 ronpinkas Exp $
 */


// Testing Harbour dates management.
#include "set.ch"

STATIC s_cNewLine

function main()
   LOCAL i
   LOCAL dDate := date()

   s_cNewLine := HB_OSNewLine()

   set( _SET_DATEFORMAT, "dd/mm/yyyy" )

   for i := 7 to 49 step 7
      CheckDate( dDate )
      dDate += i
   next

return nil

function CheckDate( dDate )
   OutStd( "Testing date:", dDate , s_cNewLine )
   OutStd( "Days in month..:", daysinmonth( dDate ), s_cNewLine )
   OutStd( "Day of year....:", doy( dDate ), s_cNewLine )
   OutStd( "Begin of month.:", bom( dDate ), s_cNewLine )
   OutStd( "End of month...:", eom( dDate ), s_cNewLine )
   OutStd( "Week of month..:", wom( dDate ), s_cNewLine )
   OutStd( "Week of year...:", woy( dDate ), s_cNewLine )
   OutStd( "Begin of year..:", boy( dDate ), s_cNewLine )
   OutStd( "End of year....:", eoy( dDate ), s_cNewLine )
   __Accept( "Press ENTER to continue..." )
   OutStd( chr( 10 ), chr( 10 ) )

return nil


Regards,
Dutch
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How can I use xHarbour Functions?

Postby Enrico Maria Giordano » Tue Apr 14, 2009 9:06 pm

Your sample works just fine here.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8408
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How can I use xHarbour Functions?

Postby Antonio Linares » Wed Apr 15, 2009 1:12 am

Dutch,

You have to link CT.lib
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41461
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How can I use xHarbour Functions?

Postby dutch » Wed Apr 15, 2009 2:55 pm

Dear Antonio & EMG.

I work ok now but
How can I know which lib is used for which function?

Regards,
Dutch
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How can I use xHarbour Functions?

Postby Antonio Linares » Wed Apr 15, 2009 4:13 pm

Dutch,

Sometimes it is as simple as to do a file contents search in the libs folder using a tool like the Total Commander :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41461
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How can I use xHarbour Functions?

Postby dutch » Wed Apr 15, 2009 5:45 pm

Thanks Antonio,

I've got it.

Regards,
Dutch
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 125 guests