This works and outputs the text "var is a TStringList" in message panel
- Code: Select all
var SL = new TStringList;
if (SL is TStringList) Script.Message("var is a TStringList");
delete SL;
But when the var is NOT a TStringList, like in this example:
- Code: Select all
var NUM = 33;
if (NUM is TStringList) Script.Message("var is a TStringList");
An error is displayed in message panel: "Access violation at address 004062C0 in module 'webuild.exe'. Read of address 00000021"