The experiment of serial parallel data structure requires us to realize the experimental environment of SML.
This article shows the configuration of the SML environment on a simple command line on a Mac.
1. First visit http://www.smlnj.org/
Download find the latest file I'm here
SML/NJ 110.82 Distribution Files
And I found it.
MacOS (nèe Mac OS X)
Can either use the ' generic Unix ' procedure above or you can install a pre-built system using the ' installer package ' in either smlnj-x86-110.82.pkg. For more information, see below.
Download.
2. Open the downloaded installer and follow the prompts to install it.
3. We can try it first. Open command line Input SML
My response here is command not found.
The reason is simple: to get this command to be found, he must be in our environment variable path so that the computer knows where to look for the command.
So what we're going to do is add the address of our SML to path.
The SML after installation is generally located in /usr/local/smlnj if not then you will have to find the exact location of the SML installation. (according to the installer downloaded on the Internet, it will generally be installed in the path I said)
And the path changes, there are many kinds, we just need to modify our shell's path. (Detailed online There are many such as: http://www.cnblogs.com/haore147/p/3633116.html)
If you want to solve the problem effectively, then just follow my steps to go.
4. View your shell
First, you need to know what your SHELL is. Open the command line and enter Echo $SHELL
If you're zsh, then it'll show.
/bin/zsh
If your is bash then it will show
/bin/bash
In turn. In a word, you already know what your shell is.
5. Modify your shell environment files
In general, direct CD back to your user's directory
You can ls-al see the file under the directory, which will have your environment file, if your is bash then he should be called. Bashprofile
If you're zsh, then he should be called. ZSHRC
In other cases, Baidu can be self.
After finding this file, we can modify it (vim or open with your
For example, I am zsh input open. ZSHRC
We just need to see the front-most settings for path.
If you hadn't changed him before, then he would have had no second line, because the second line was the one I added myself.
Now it's easy, you just need to insert a line of code in the first and second rows as I do
Export path= $PATH: yoursmladdress
This line of code is probably the string path= the original path at the end plus the address you just added.
The change is done.
Now we re-enter SML should appear similar to
Standard ML of New Jersey v110.82 [Built:sat Oct 14 15:12:52 2017]
-
So our environment configuration is done!
Serial parallel Data structure experiment--MAC SML Environment installation 1