1.bat/cmd不能加密,没办法的
2. 你要的是这个?
procedure foo; procedure nested; begin // nested procedure code here end;begin // foo code hereend;