Nope if (*_item = 'T') does not detect the left most character
Thanks Jerry

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Garrett Fitzgerald
Sent: Wednesday, July 29, 2009 10:08 AM
To: [email protected]
Subject: Re: C functions

On Wed, Jul 29, 2009 at 10:53, Jerry Foote<[email protected]> wrote:
> Does anyone know of a table that lists C functions with similar functions
to
> VFP? Or maybe basic
>
> Right now I'm struggling with this code
>
> if ( strcmp( _item,"T123" ) != 0)
>
> I want to be able to write the expression to test if first letter in _item
> is "T"
>
> In vfp I could write if substr(_item,1,1)="T"

If I remember my C correctly, that's:

if (*_item = 'T')

But it's been a while. :-)


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cd952e44a8cb46b1b066bd87a5b73...@laptop
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to