Thanks for your response, Mike, even if it's belated...:o)
I have indeed figured it out already, in fact, I had figured it out before I
posted the question, I just wanted to know if I could do it without a loop
(I've really been on a code optimization kick lately, even if there's not
much of a speed issue)
One thing that nobody seemed to pick up on is that I wanted comments to
start with "/*" and end with "*/" so that they could be several lines if
required. I've got it working fine with a loop, and my limit files are not
long, so the time for processing is minimal.
Thanks again...
Reiner
-----Original Message-----
From: Mike Groves [mailto:mikegroves@pacbell.net]
Sent: Tuesday, November 25, 2003 5:59 AM
To: VEE vrf
Cc: Schlieker, Reiner
Subject: [vrf] RE: /* comments in text file */
Reiner,
I saw this post a couple of months ago and wanted to comment on it, but I
forgot until I stumbled on it again recently. Processing of string arrays
is indeed supported and can be used to simplify the program that included
the loop. I think the problem Mike ran into is the triadic operator can't
return more than a single result, so another solution needed to be found.
I used a little math that took advantage of the -1 that gets returned if
the delimiter was not found to make it work with the string array. There
might be other solutions, but this is what I came up with.
In your original post, you mentioned a "2D" array. If you need help making
this work with whatever 2D array structure you have, email me directly and
I'm sure we can get it working. Of course, it's been a couple of months, so
you might be well past this part by now.
Cheers!
Mike Groves
-----Original Message-----
From: Michael Asbery [mailto:michael.asbery@nrl.navy.mil]
Sent: Monday, September 22, 2003 3:08 PM
To: VEE vrf
Subject: [vrf] RE: /* comments in text file */
Try this. Unfortunately, String processing is not supported as a
matrix/vector function, thus a loop was required.
Mike
***********************************************************
Michael N. Asbery (202)404-3014, DSN 754
US Naval Research Laboratory fax (202)404-7661
Code 5733.20 michael.asbery@nrl.navy.mil
4555 Overlook Ave SW
Washington DC 20375
***********************************************************
-----Original Message-----
From: Schlieker, Reiner [mailto:reiner.schlieker@siemens.com]
Sent: Monday, September 22, 2003 2:31 PM
To: VEE vrf
Subject: [vrf] /* comments in text file */
Hello vrf'ers:
I have a limit file which is simply a text file with info like the following
in it:
Test_name
12.5
16.9
Real
This is parsed out into a 2d array. I want to be able to include comments
in the file, such as
/* a comment here */ ala C.
Has anybody done this? I'd like to have an elegant solution without loops,
if possible.
Thanks for any replies,
_____________________________________
Reiner Schlieker
Test Equipment Designer
Siemens Milltronics Process Instruments Inc.
Phone: (705) 740-7553
Fax: (705) 740-7692
Email: reiner.schlieker@siemens.com
Web: www.siemens-milltronics.com
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
I have indeed figured it out already, in fact, I had figured it out before I
posted the question, I just wanted to know if I could do it without a loop
(I've really been on a code optimization kick lately, even if there's not
much of a speed issue)
One thing that nobody seemed to pick up on is that I wanted comments to
start with "/*" and end with "*/" so that they could be several lines if
required. I've got it working fine with a loop, and my limit files are not
long, so the time for processing is minimal.
Thanks again...
Reiner
-----Original Message-----
From: Mike Groves [mailto:mikegroves@pacbell.net]
Sent: Tuesday, November 25, 2003 5:59 AM
To: VEE vrf
Cc: Schlieker, Reiner
Subject: [vrf] RE: /* comments in text file */
Reiner,
I saw this post a couple of months ago and wanted to comment on it, but I
forgot until I stumbled on it again recently. Processing of string arrays
is indeed supported and can be used to simplify the program that included
the loop. I think the problem Mike ran into is the triadic operator can't
return more than a single result, so another solution needed to be found.
I used a little math that took advantage of the -1 that gets returned if
the delimiter was not found to make it work with the string array. There
might be other solutions, but this is what I came up with.
In your original post, you mentioned a "2D" array. If you need help making
this work with whatever 2D array structure you have, email me directly and
I'm sure we can get it working. Of course, it's been a couple of months, so
you might be well past this part by now.
Cheers!
Mike Groves
-----Original Message-----
From: Michael Asbery [mailto:michael.asbery@nrl.navy.mil]
Sent: Monday, September 22, 2003 3:08 PM
To: VEE vrf
Subject: [vrf] RE: /* comments in text file */
Try this. Unfortunately, String processing is not supported as a
matrix/vector function, thus a loop was required.
Mike
***********************************************************
Michael N. Asbery (202)404-3014, DSN 754
US Naval Research Laboratory fax (202)404-7661
Code 5733.20 michael.asbery@nrl.navy.mil
4555 Overlook Ave SW
Washington DC 20375
***********************************************************
-----Original Message-----
From: Schlieker, Reiner [mailto:reiner.schlieker@siemens.com]
Sent: Monday, September 22, 2003 2:31 PM
To: VEE vrf
Subject: [vrf] /* comments in text file */
Hello vrf'ers:
I have a limit file which is simply a text file with info like the following
in it:
Test_name
12.5
16.9
Real
This is parsed out into a 2d array. I want to be able to include comments
in the file, such as
/* a comment here */ ala C.
Has anybody done this? I'd like to have an elegant solution without loops,
if possible.
Thanks for any replies,
_____________________________________
Reiner Schlieker
Test Equipment Designer
Siemens Milltronics Process Instruments Inc.
Phone: (705) 740-7553
Fax: (705) 740-7692
Email: reiner.schlieker@siemens.com
Web: www.siemens-milltronics.com
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
I do this with all my ini files. I put the description on lines 1,3,5 etc
and the settings on 2,4,6 etc. Then I read all the descriptions to an empty
read line (read x) nothing attached to the output pin. The data (read y)
goes to a collector. It doesn't discriminate the descriptions from the data
but the ini files are easy to read.
Hope this helps.
Mark
-----Original Message-----
From: Schlieker, Reiner [mailto:reiner.schlieker@siemens.com]
Sent: Monday, September 22, 2003 11:31 AM
To: VEE vrf
Subject: [vrf] /* comments in text file */
Hello vrf'ers:
I have a limit file which is simply a text file with info like the following
in it:
Test_name
12.5
16.9
Real
This is parsed out into a 2d array. I want to be able to include comments
in the file, such as
/* a comment here */ ala C.
Has anybody done this? I'd like to have an elegant solution without loops,
if possible.
Thanks for any replies,
_____________________________________
Reiner Schlieker
Test Equipment Designer
Siemens Milltronics Process Instruments Inc.
Phone: (705) 740-7553
Fax: (705) 740-7692
Email: reiner.schlieker@siemens.com
Web: www.siemens-milltronics.com
---
You are currently subscribed to vrf as: Mark.Goldberg@ATK.COM
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@it.lists.it.agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@it.lists.it.agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".