Changeset 27 for branches/Syntetizer/UMainForm.pas
- Timestamp:
- Oct 29, 2009, 11:07:49 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Syntetizer/UMainForm.pas
r26 r27 47 47 with TProgram(BaseElement) do begin 48 48 Name := 'Test'; 49 with TCompilerDirective(CompilerDirectives[CompilerDirectives.Add(TCompilerDirective.Create)]) do begin 50 Variable := 'APPTYPE'; 51 Value := 'CONSOLE'; 52 end; 53 with Variables do begin 54 with TVariableDeclaration(Variables[Variables.Add(TVariableDeclaration.Create)]) do begin 55 Name := 'Text'; 56 VarType := 'string'; 57 end; 58 end; 59 with Code do begin 60 with TProcedureCall(Commands[Commands.Add(TProcedureCall.Create)]) do begin 61 Name := 'WriteLn'; 62 with TProcedureParameter(Parameters[Parameters.Add(TProcedureParameter.Create)]) do begin 63 Value := '''Hello hell'''; 64 end; 65 end; 66 with TProcedureCall(Commands[Commands.Add(TProcedureCall.Create)]) do begin 67 Name := 'ReadLn'; 68 end; 69 end; 49 70 end; 50 71 Syntetize; 51 72 Memo1.Lines.Assign(Output); 52 Output.SaveToFile('Output. pas');73 Output.SaveToFile('Output.dpr'); 53 74 end; 54 75 end;
Note:
See TracChangeset
for help on using the changeset viewer.