Visual Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 17974
Number of posts: 55343

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Parsing nulls with MID statement Posted by ChasB on 8 Oct 2011 at 11:12 AM
When parsing a data stream with VB 5 and the MID statement, it refuses to pass back nulls (x'00'). I'm a mainframe Assembler programmer and it's very irritating to have the compiler decide what data I want/need to see. If a string contains "ABCD" + 3 nulls + "DEF" and I use Mid(x, i, 1) to examine each byte in the string, the 5th iteration doesn't give me the 1st of the 3 nulls. It skips over the nulls and passes back the "E" as if it were in the 5th position. Maddening. What should I be using instead of the MID statement to interrogate/manipulate every byte in the string?

Thanks



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.