- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: strcmp not working at certain portions of same...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2010 05:06 AM
тАО05-03-2010 05:06 AM
strcmp not working at certain portions of same program
These days I come across a strange problem wherein strcmp doesn't work at certain parts of my C program. I explicitly need to compare each character of the string in the array using == with the individual alphabet. e.g. actn[0]=='R'
Has any of you come across this issue before?
string.h has been included as one of the header files.
OS: HP-UX B.11.00
CC compiler
Any input is appreciated
- Tags:
- strcmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2010 02:45 PM
тАО05-03-2010 02:45 PM
Re: strcmp not working at certain portions of same program
You first. Actual code might reveal more
than a vague (and confusing) description.
> [...] e.g. actn[0]=='R'
What does that have to do with strcmp()?
> [...] strcmp doesn't work [...]
Much more likely: Your code is bad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2010 11:45 PM
тАО05-03-2010 11:45 PM
Re: strcmp not working at certain portions of same program
You are out of luck, this HP-UX version isn't supported nor is the compiler. What compiler version are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2010 01:23 AM
тАО05-04-2010 01:23 AM
Re: strcmp not working at certain portions of same program
Maybe due to a memory corruption.
changing the code move can change the corruption footprint.
Or ending 0 is missing.
or there is a 0 at the middle of the string - which would mean it stops the comp at the first 0 encountered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2010 01:37 AM
тАО05-04-2010 01:37 AM
Re: strcmp not working at certain portions of same program
b * strcmp
x /s $r26
x /s $r25