comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: [Q] illegel character?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: [Q] illegel character? [message #2522] Mon, 01 August 1994 09:52
braendle is currently offline  braendle
Messages: 5
Registered: May 1994
Junior Member
Try / instead of \ as directory separators in the full qualified pathname
e.g. use: 'c:/temp/x1234.dat' instead of
'c:\temp\x1234.dat'
to avoid the misinterpretation.
This usually works well with DOS & Windows programs

Hope this helps

Gerhard
Re: [Q] illegel character? [message #2532 is a reply to message #2522] Thu, 28 July 1994 06:27 Go to previous message
landers is currently offline  landers
Messages: 45
Registered: May 1993
Member
In article <1994Jul26.061603.10056@news.snu.ac.kr>, s_lumber@cd4680.snu.ac.kr (JeeYong Park) writes:
|> In programming IDL3.0, whenever I tried to open files with name starting
|> with number or chracter x, I ran into an illegel character error.
|> I mean whean I try " openr, 1, 'c:\user\yong\xy1234.dat' " those errors
|> occur. I guess IDL recognize something starting with \x or \number as
|> hex or octal number.
|> I'd like to know how to read this kind of file except renaming file name.
|>
|> I'd like to you have time to answer this question and please e-mail me
|> personally as well as posting here.
|> My e-mail address is : slumber@alliant.snu.ac.kr
|>
|> Thank you in advance.
|>
|>
|>

In a string, '\123' is interpreted as octal, and '\x34' or '\X34' as hex.
You are supposd to be able to use '\\' to represent a literal '\', but this
doesn't seem to work right in PV-WAVE CL 4.20 - don't know about IDL.
You can play games with concatenating strings, having each end in a \, like:
'c:\' + 'user\' + 'yong\' + 'xy1234.dat'

A bit awkward.

Good luck,
;Dave
Re: [Q] illegel character? [message #2534 is a reply to message #2532] Thu, 28 July 1994 08:40 Go to previous message
djackson is currently offline  djackson
Messages: 31
Registered: June 1993
Member
In article <1994Jul26.061603.10056@news.snu.ac.kr>
s_lumber@cd4680.snu.ac.kr (JeeYong Park) writes:

> In programming IDL3.0, whenever I tried to open files with name starting
> with number or chracter x, I ran into an illegel character error.
> I mean whean I try " openr, 1, 'c:\user\yong\xy1234.dat' " those errors
> occur. I guess IDL recognize something starting with \x or \number as
> hex or octal number.
> I'd like to know how to read this kind of file except renaming file name.

Annyong haseyo,

I think the " openr, 1, 'c:\user\yong\xy1234.dat' " problem you're
having is
exactly as you described, that \x... is treated as a numeric constant.
This
was changed, I believe in version 3.1 or 3.5 so that it is not treated
this
way, for the convenience of users on DOS machines. (this caused some
problems with people who relied on the \x... notation, but your problem
is
now the reverse!)

If you have any way to upgrade, this will provide the solution, or you
could
try " openr, 1, 'c:\user\yong\' + 'xy1234.dat' " which might work fine
in
some cases. Or in general, '\' + 'x' should be an adequate
replacement.

Cheers,
-Dick

Dick Jackson djackson@ibd.nrc.ca Standard disclaimer
Institute for Biodiagnostics, National Research Council Canada
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Bug in WHERE_ARRAY.PRO
Next Topic: ticks/tickv/tickname bug?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 09:57:42 PDT 2025

Total time taken to generate the page: 0.80133 seconds