The following two cd calls do the same thing, changing directory to a directory named a.
The following two cd calls do the same thing, changing directory to the directory c:\code.
a = 'c:\code';
The first set of cd calls does not do the same thing as the second set of cd calls.
See this documentation page for a description of how to use either the command syntax or the function syntax to call a function.