The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 trailing zeroes causing problems on file import
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

amorris

Canada
Posts

Posted - 02/22/2006 :  02:43:55 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5SR6
Operating System:winXP

Hi everyone,

I'm trying to import and analyse a series of files that have the following format:

EIG_N=05_g=X.XXXX_rot=0.5698_3LL.dat

where X.XXX is a number of the form 1.000 or 4.6493. I know that this is a rather ugly file name, but please bear with me anyway. Suppose that I have thousands of these files which represent the variable g incrementing from 0.0000 to 9.0000 in steps of 0.0001. This is not always the case, just an example.

My problem is that I want to loop over the variable g in some file import script and then perform some analysis. When I try to import a file with trailing zeroes such as

EIG_N=05_g=1.0000_rot=0.5698_3LL.dat,

my loop variable g=1.0000 is represented in labtalk as 1 and origin tried to import the file EIG_N=05_g=1_rot=0.5698_3LL.dat.

Is there any way to get around this?

Any help would be greatly appreciated,

Alexis

Mike Buess

USA
3037 Posts

Posted - 02/22/2006 :  08:13:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Use $(g,.4) to force 4 digits beyond decimal point...

g=1;
%A=$(g,.4)_rot;
%A=;
1.0000_rot

Mike Buess
Origin WebRing Member
Go to Top of Page

amorris

Canada
Posts

Posted - 02/22/2006 :  12:04:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Mike! I knew that there must be some easy way to do this, but for some reason I couldn't find it in the help files.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000