It merely adds the new variable to the end of the file and leaves the original string intact. This method will not, as does the Define Variable menu option, replace the original string variable with a new numeric variable of the same name. Once numvar is computed through either means, you can use a FORMATS command to format it for display, as does the routine executed via the Define Variable menu.
Substitute for "Fw.d" in the second example the numeric format you want to use to read the string variable. You can compute a new numeric variable from the original string variable through SPSS command syntax using either of two routes: It is a "new" variable in so far as all other dictionary information attached to the previous variable is lost, but it otherwise assumes the position in the file of the previous variable. The FORMATS command is eventually applied to the new variable, but this is the only portion of the process executed via SPSS commands, and hence is the only command that shows up in the log and in the journal file. This process allows SPSS to convert invisibly a variable format while leaving it in the same place in the data file. When SPSS converts a variable from a string to numeric format (or from any format to another) through the Define Variable menu, it executes a process in the Data Editor that is not driven exclusively by SPSS commands.