- Set your path in your
`.cshrc`so that you may call the SML interpreter directly using the command`sml`__Question:__**How do you know from the prompt whether you are in SML or not?** - You may use SML as a command-line calculator to compute various
complex expressions including the following:
- (2+3)*100-8
- (2.0+3.0)*100.0-8.0

__Question:__**Do you see any difference between these expressions?**__Question:__**What about the following?**- (2+3)*100-8 div 6
- (2+3)*100-8 mod 6
`(2.0+3.0)*100.0 - 8.0/6.0`

__Question:__**Do you understand why you get different answers in each case?** - Find out all the primitive functions on integers by typing
`open Int;`. Since most of them are self-explanatory you probably understand what they do.__Question:__**But can you figure out what the following functions are?**- compare
- toString
- fromString
`~`

__Question:__**Can you figure out when the two functions**`div`and`quot`**will give different answers?**__Question:__**Simlarly what is the difference between**`rem`**and**`mod`?__Question:__**Try to give one or more**__identities__that connect the functions`div`,`quot`,`rem`and`mod`? - Now open the structure
`Real`and see what functions you can recognize? Experiment with the functions you don't understand and try to figure out what they do.__Question:__**How will you convert between integers and reals when you have to?** - There are
__three__more basic data types you need to explore:`Bool``String``Char`

__Question:__**What do the following functions do?**- sub
- substring
`<`

__Question:__**What sort of ordering on strings does**`<`**implement?**__Question:__**Can you figure out why you have the following functions on strings? Does it make any sense at all to have them for strings too?**- fromString
`toString`

S. Arun-Kumar Last modified: Fri Aug 11 09:54:19 2006