SET assigns value to the variable at RUNTIME.
#DIM declare the variable and it's Data Type at COMPILE TIME.
SET |
#DIM |
| Makes the variables Dynamic. | Improves Readability. |
| No Data Type Declaration. | Enables IDE auto-completion. |
| Runtime | Useful for Object references. |
#DIM name As %String
Set name = "Micheal Scott"
#DIM age As %Numeric
Set age = 36
#DIM employer As App.Employer ; compile time
Set employer = ##class(App.Employer).%New() ; runtime .png)



.png)
.png)