Page 2 of 2

Re: AT() with 3 Parameter.

Posted: Wed Oct 23, 2019 10:08 pm
by apais
AT() is strictly Clipper compatible as per Harbour guidelines.
Hence the creation of HB_AT.

Re: AT() with 3 Parameter.

Posted: Wed Oct 23, 2019 10:44 pm
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

Re: AT() with 3 Parameter.

Posted: Wed Oct 23, 2019 11:20 pm
by apais
Ussually the best source of inside information is Harbour's Changelog

Re: AT() with 3 Parameter.

Posted: Thu Oct 24, 2019 4:45 am
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

Re: AT() with 3 Parameter.

Posted: Thu Oct 24, 2019 11:20 pm
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

Re: AT() with 3 Parameter.

Posted: Sat Oct 26, 2019 3:18 pm
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.