help to make a condition

help to make a condition

Postby Silvio.Falconi » Sat Oct 12, 2024 9: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: help to make a condition

Postby nageswaragunupudi » Sun Oct 13, 2024 2:05 am

This is working for me here
Code: Select all  Expand view
#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
User avatar
nageswaragunupudi
 
Posts: 10641
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: help to make a condition

Postby Silvio.Falconi » Mon Oct 14, 2024 6:03 am

nageswaragunupudi wrote:This is working for me here
Code: Select all  Expand view
#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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 43 guests