473,396 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

I used to use fixed-length strings


I have to parse a bar code. Back in VB6, I can remember putting a
string into a structure that had members with fixed-length strings and
then I could pick off the memebers by name.

But we can ignore that if there's a better idea. I simply would like to
create a technique to parse the bar code that will be easily portable.
I could keep a set of constants that
would contain the start position and length of each field within the bar
code, but I'm thinking there's a slicker way to do it.

TIA,
Jim

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #1
1 1050

"Jim Corey" <jc****@nospamcharter.net> wrote
I have to parse a bar code. Back in VB6, I can remember putting a
string into a structure that had members with fixed-length strings and
then I could pick off the memebers by name.

But we can ignore that if there's a better idea. I simply would like to
create a technique to parse the bar code that will be easily portable.
I could keep a set of constants that
would contain the start position and length of each field within the bar
code, but I'm thinking there's a slicker way to do it.


Not having worked with bar codes, I am not sure of exactly what you
need, but look up the FieldOffsetAttribute in VS Help. It basically
allows you to declare a structure where two or more fields share the
the same memory....

Another example can be found when you look up 'Unions Sample'
in VS Help.

HTH
LFS
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: J. Campbell | last post by:
From reading this forum, it is my understanding that C++ doesn't require the compiler to keep code that does not manifest itself in any way to the user. For example, in the following: { for(int...
0
by: News Reader | last post by:
Hello, I am trying to use cx_bsdiff (http://starship.python.net/crew/atuining/cx_bsdiff/index.html) to to make a diff and patch some files. It appears that I can make the diff, but when I...
2
by: TadPole | last post by:
Hi all, My main problems are::::::::: 1. Set a value within a block container that can be used and changed by subsequent templates/block-containers/tables etc.. 2. get/determine/find the...
9
by: pout | last post by:
What are the purposes of fixed-point? When should it be used? I read: #define Int2Fixed(x) (((long)(short)x) << 16) and the fixed-point in 16.16 format. Does the 16 in the MACRO refer to...
6
by: John A Grandy | last post by:
inside a procedure , i code Dim values(1) As Object .... various other lines of code ... ReDim values(2) As Object
4
by: Steven Cummings | last post by:
Hello, I'm currently developing on a large project where several assemblies build into DLLs that support the final .NET EXE. The original plan was to implement the project in VB.NET, so the EXE...
0
by: sloan | last post by:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;316495 Radio Buttons Are Not Mutually Exclusive When Used in a Repeater Server Control ... Has 2.0 fixed this bug ?
0
by: sloan | last post by:
BUG: Radio Buttons Are Not Mutually Exclusive When Used in a Repeater Server Control http://support.microsoft.com/default.aspx?scid=kb;EN-US;316495 I programmed up a pretty simple page in 2.0. ...
4
by: Otie | last post by:
Hello, I am using the MSFlexGrd Control in VB5. I have 1 fixed row and one fixed column. I am trying to do a sort when the user clicks a column in the FIXED ROW. But when I capture the row...
1
by: O.B. | last post by:
In the example below, I'm trying to convert a fixed byte array to a string. I get an error about needing to use "fixed" but I have no clue where to apply it. Help? using System; using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.