TIP: Click on subject to list as thread! ANSI
echo: clipper
to: RON TUYNMAN
from: ERIK WACHTMEESTER
date: 1997-06-26 07:22:00
subject: Adding Fields in Clipper 5.2

Reply-To: erik.wachtmeester@bighole.iaf.nl
Ron Tuynman wrote in a message to Bong Benitez:
 RT>  //---Detecting:
 RT>  aRay := DBSTRUCT ( "NAME.DBF" )
 RT>  log := .f.
 RT>  FOR d = 1 to LEN aRay
 RT>      IF  "ADRESS" $ UPPER( aRay[ d ][ 1 ] )
 RT>          //---Log becomes true if a field named ADRESS exists
 RT>          log := .t.
 RT>      ENDIF
 RT>  NEXT
Instead of the for/next loop I would use something like:
log := ( ascan( aRay, { |x| x[1] = 'ADDRESS' } ) # 0 )
Regards,
Erik 
---
---------------
* Origin: May it be on this earth? (2:283/7.2)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.