FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour help to make a condition
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
help to make a condition
Posted: Sat Oct 12, 2024 09:41 PM

Insert a code block

I have

sample nLastRecords:= 2000

IF nLastRecords > 0

   nInit:=olotto:lastrec()-nLastRecords

   nEnd:= olotto:lastrec()

ENDIF

and I must insert this on a codeblock

bFor:= { || recno() <= nInit .and. recno() >= nEnd }

but make error

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: help to make a condition
Posted: Sun Oct 13, 2024 02:05 AM
This is working for me here
Code (fw): Select all Collapse
#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local bFor, aData
   local nStart, nLast

   USE CUSTOMER NEW SHARED VIA "DBFCDX"

   nStart   := 100
   nLast    := 110

   bFor  := { || RECNO() >= nStart .AND. RECNO() <= nLast }
   aData := FW_DbfToArray( "ID,FIRST,SALARY", bFor )
   XBROWSER aData

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: help to make a condition
Posted: Mon Oct 14, 2024 06:03 AM
nageswaragunupudi wrote:This is working for me here
Code (fw): Select all Collapse
#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local bFor, aData
   local nStart, nLast

   USE CUSTOMER NEW SHARED VIA "DBFCDX"

   nStart   := 100
   nLast    := 110

   bFor  := { || RECNO() >= nStart .AND. RECNO() <= nLast }
   aData := FW_DbfToArray( "ID,FIRST,SALARY", bFor )
   XBROWSER aData

return nil
Thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion