Question on strings, paths and double backslashes in GAUSS

Hello,

Can any one explain the following code? I debugged to here and have no idea what should I do next.

opath   = parapath $+ "\\mhrun" $+ mhrun;
chkdir  = chk_dir(opath);

opara  = opath $+ "\\pa";
create fhpara = ^opara with para, ndgp_ + nphi_+ nadd_, 8;

What does does double backslash mean here?

1 Answer



0



The double back-slash is used for Window's path separators inside of quotes. This is because a single-backslash is an escape sequence. For example \n means new-line, \t means tab-space, etc.

$+ operator combines strings, so, you could make the path C:\gauss14\myproject like this:

opath = "C:\\gauss14";
parapath = "\\myproject";
fullpath = opath $+ parapath;

aptech

1,773

Your Answer

1 Answer

0

The double back-slash is used for Window's path separators inside of quotes. This is because a single-backslash is an escape sequence. For example \n means new-line, \t means tab-space, etc.

$+ operator combines strings, so, you could make the path C:\gauss14\myproject like this:

opath = "C:\\gauss14";
parapath = "\\myproject";
fullpath = opath $+ parapath;

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy