11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

116 [ U ] 11 Language syntax11.6.1 A special note for Mac usersHave you seen the notation myfolder/myfile before? This notation is called a path and describesthe location of a file or folder (also called a directory).You do not have to use this notation if you do not like it. You could instead restrict yourself to usingfiles only in the current folder. If that turns out to be too restricting, Stata for Mac provides enoughmenus and buttons that you can probably get by. You may, however, find the notation convenient. Ifyou do, here is the rest of the definition.The character / is called a path delimiter and delimits folder names and filenames in a path. Ifthe path starts with no path delimiter, the path is relative to the current folder.For example, the path myfolder/myfile refers to the file myfile in the folder myfolder, whichis contained in the current folder.The characters .. refer to the folder containing the current folder. Thus ../myfile refers tomyfile in the folder containing the current folder, and ../nextdoor/myfile refers to myfile inthe folder nextdoor in the folder containing the current folder.If a path starts with a path delimiter, the path is called an absolute path and describes a fixedlocation of a file or folder name, regardless of what the current folder is. The leading / in an absolutepath refers to the root directory, which is the main hard drive from which the operating system isbooted. For example, the path /myfolder/myfile refers to the file myfile in the folder myfolder,which is contained in the main hard drive.The character ~ refers to the user’s home directory. Thus the path ~ /myfolder/myfile refers tomyfile in the folder myfolder in the user’s home directory.11.6.2 A special note for Unix usersStata understands ~ to mean your home directory. Stata understands this, even if you do not usecsh(1) as your shell.11.7 ReferencesBaum, C. F. 2009. An Introduction to Stata Programming. College Station, TX: Stata Press.Kolev, G. I. 2006. Stata tip 31: Scalar or variable? The problem of ambiguous names. Stata Journal 6: 279–280.Ryan, P. 2005. Stata tip 22: Variable name abbreviation. Stata Journal 5: 465–466.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!