AT() with 3 Parameter.

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

User avatar
apais
Posts: 441
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF, Leto, MariaDB, SQLite
Location: uruguay
Contact:

Re: AT() with 3 Parameter.

Post by apais »

AT() is strictly Clipper compatible as per Harbour guidelines.
Hence the creation of HB_AT.
Angel Pais
Web Apps consultant/architect/developer.
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: AT() with 3 Parameter.

Post by AUGE_OHR »

apais wrote: Wed Oct 23, 2019 10:08 pm AT() is strictly Clipper compatible as per Harbour guidelines.
OK, understand
apais wrote:Hence the creation of HB_AT.
but what is the Difference to Hb_Ati() :?:
can you enlighten me please
have fun
Jimmy
User avatar
apais
Posts: 441
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF, Leto, MariaDB, SQLite
Location: uruguay
Contact:

Re: AT() with 3 Parameter.

Post by apais »

Ussually the best source of inside information is Harbour's Changelog
Angel Pais
Web Apps consultant/architect/developer.
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: AT() with 3 Parameter.

Post by edk »

AUGE_OHR wrote: Wed Oct 23, 2019 9:36 pm ok

i saw hb_AtI() is a harbour function so i wonder why AT() will only accept 2 Parameter :?:

Question ; what is the Difference between hb_At() vs. hb_Ati() :?:

i have read Description
This function has same functionality as hb_At() with the significant difference that it's case Insensitive.

Optionally, with nStart can be defined the position into main string from where the search of cSearch must begin and with nEnd the position where it must stop. If neither of them is defined, nStart is 1st position and nEnd the ending of cString.
but i still "see" no Difference.

can someone please show me a sample where hb_At() fail while hb_Ati() work :?:
This function has same functionality as hb_At() with the significant difference that it's case Insensitive.

? hb_At( "AS", "as simple as possible", 5 ) // --> 0
? hb_Ati( "AS", "as simple as possible", 5 ) // --> 11
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: AT() with 3 Parameter.

Post by AUGE_OHR »

edk wrote: Thu Oct 24, 2019 4:45 am This function has same functionality as hb_At() with the significant difference that it's case Insensitive.

Code: Select all

? hb_At( "AS", "as simple as possible", 5 )   // --> 0
? hb_Ati( "AS", "as simple as possible", 5 )  // --> 11
AHA ... now i understand, THX
have fun
Jimmy
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: AT() with 3 Parameter.

Post by andyglezl »

SALINETAS24 wrote: Wed Oct 23, 2019 9:05 am
andyglezl wrote: Wed Oct 23, 2019 3:32 am Tal vez de esta manera...
*------------------------------------
Maybe this way ...

Code: Select all

   DO WHILE nPosi > 0
      nPosi := AT( cSign, cString )
      cString := SUBSTR( cString, nPosi )
      IF nPosi > 0
         nRet ++
      ELSE
         EXIT
      ENDIF
   ENDDO
solo una pequeña corrección

Code: Select all

   DO WHILE nPosi > 0
      nPosi := AT( cSign, cString )
      cString := SUBSTR( cString, nPosi+1 )   //Sumar 1 a nPos, en caso contrario estará en bucle
      IF nPosi > 0
         nRet ++
      ELSE
         EXIT
      ENDIF
   ENDDO
Saludos

Lo siento, no lo probé, era solo la idea.
*---------------------------------------------------
I'm sorry, I didn't try it, it was just the idea.
Andrés González López
Desde Guadalajara, Jalisco. México.
Post Reply