FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How can I use xHarbour Functions?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How can I use xHarbour Functions?
Posted: Tue Apr 14, 2009 05: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 (fw): Select all Collapse
#include 'fivewin.ch'
function main
msginfo( eom( date() ) )
return nil


xHarbour's Date Function
Code (fw): Select all Collapse
/*
 * $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 2304 / 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)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How can I use xHarbour Functions?
Posted: Tue Apr 14, 2009 09:06 PM

Your sample works just fine here.

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How can I use xHarbour Functions?
Posted: Wed Apr 15, 2009 01:12 AM

Dutch,

You have to link CT.lib

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How can I use xHarbour Functions?
Posted: Wed Apr 15, 2009 02: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 2304 / 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)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How can I use xHarbour Functions?
Posted: Wed Apr 15, 2009 04: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
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How can I use xHarbour Functions?
Posted: Wed Apr 15, 2009 05:45 PM

Thanks Antonio,

I've got it.

Regards,
Dutch

Regards,

Dutch



FWH 2304 / 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)

Continue the discussion