Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Vivan los recargables

1 view
Skip to first unread message

Alberto Glez

unread,
Oct 20, 2005, 7:23:37 PM10/20/05
to
Los mecheros BIC no valen pa nada.

Elendil

unread,
Oct 21, 2005, 12:20:19 PM10/21/05
to

"Alberto Glez" <gl...@company.com> escribió en el mensaje
news:ZFV5f.107492$US.3...@news.ono.com...

> Los mecheros BIC no valen pa nada.

No te parece singular el manejo de strings?????????

/***
*
* String.prg
*
* Sample user-defined functions for processing character strings
*
* Copyright (c) 1993, Computer Associate International Inc.
* All rights reserved.
*
* NOTE: Compile with /a /m /n /w
*
*/

#include "Common.ch"


/***
*
* CityState( <cCity>, <cState>, <cZip> ) --> cString
*
* Format city, state and zip variables into a single string
*
*/
FUNCTION CityState( cCity, cState, cZip )
RETURN ( RTRIM( cCity ) + ", " + RTRIM( cState ) + " " + cZip )

/***
*
* ListAsArray( <cList>, <cDelimiter> ) --> aList
*
* Convert a delimited string to an array
*
*/
FUNCTION ListAsArray( cList, cDelimiter )

LOCAL nPos // Position of cDelimiter in cList
LOCAL aList := {} // Define an empty array

DEFAULT cDelimiter TO ","

// Loop while there are more items to extract
DO WHILE ( nPos := AT( cDelimiter, cList )) != 0

// Add the item to aList and remove it from cList
AADD( aList, SUBSTR( cList, 1, nPos - 1 ))
cList := SUBSTR( cList, nPos + 1 )

ENDDO
AADD( aList, cList ) // Add final element

RETURN ( aList ) // Return the array

/***
*
* Occurs( <cSearch>, <cTarget> ) --> nCount
*
* Determine the number of times <cSearch> is found in <cTarget>
*
*/
FUNCTION Occurs( cSearch, cTarget )

LOCAL nPos
LOCAL nCount := 0

DO WHILE !EMPTY( cTarget )

IF ( nPos := AT( cSearch, cTarget )) != 0
nCount++
cTarget := SUBSTR( cTarget, nPos + 1 )
ELSE
// End of string
cTarget := ""
ENDIF

ENDDO

RETURN ( nCount )

/***
*
* Proper( <cString> ) --> cProper
*
* Capitalize each word in a string
*
*/
FUNCTION Proper( cString )

LOCAL nPos
LOCAL cWord
LOCAL cProper := ""

DO WHILE !EMPTY( cString )

IF ( nPos := AT( " ", cString )) != 0
cWord := SUBSTR( cString, 1, nPos )
cString := SUBSTR( cString, nPos + 1 )
ELSE
// End of string
cWord := cString
cString := ""
ENDIF

cProper := cProper + UPPER( SUBSTR( cWord, 1, 1 )) + SUBSTR( cWord,
2 )

ENDDO

RETURN ( cProper )


Alberto Glez

unread,
Oct 24, 2005, 6:14:24 PM10/24/05
to
>
> "Alberto Glez" <gl...@company.com> escribió en el mensaje
> news:ZFV5f.107492$US.3...@news.ono.com...
> > Los mecheros BIC no valen pa nada.
>
> No te parece singular el manejo de strings?????????

> RETURN ( cProper )

Aquí está el error. Proper es de una versión antigua. En la nueva es Don
Limpio.

Elendil

unread,
Oct 25, 2005, 5:20:06 PM10/25/05
to
On Mon, 24 Oct 2005 22:14:24 GMT, Alberto Glez <gl...@company.com>
wrote:

Cuánto le pagaría Procter & Gamble para incluir esa referencia en su
codigo??????????


Alberto Glez

unread,
Oct 25, 2005, 6:50:14 PM10/25/05
to

No sé.

Pero mírate los ODBC's, anda. :-PPPPPPPP

Elendil

unread,
Oct 26, 2005, 4:16:41 AM10/26/05
to

"Alberto Glez" <gl...@company.com> escribió en el mensaje
news:GEy7f.108252$US.8...@news.ono.com...

Mande?


Elendil

unread,
Oct 26, 2005, 4:39:01 AM10/26/05
to

"Alberto Glez" <gl...@company.com> escribió en el mensaje
news:GEy7f.108252$US.8...@news.ono.com...

Vale, ya sé por donde van los tiros...


Alberto Glez

unread,
Oct 26, 2005, 6:37:20 AM10/26/05
to
>
> "Alberto Glez" <gl...@company.com> escribió en el mensaje

> Vale, ya sé por donde van los tiros...

:-D

0 new messages