-
Notifications
You must be signed in to change notification settings - Fork 0
/
Unit2.cpp
62 lines (54 loc) · 1.59 KB
/
Unit2.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//---------------------------------------------------------------------------
#include <vcl.h>
#include "Unit2.h"
#include "LForthMachine.h"
#include "Unit1.h"
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Timer1Timer(TObject *Sender)
{
StringGrid1->RowCount=(Stk->uk)+1;
for(int i=1;i<=Stk->uk;i++)
{
void *a;
a=Stk->Stck[Stk->uk-i];
StringGrid1->Cells[0][i]=*(FINT *) a;
/*switch (a.Type)
{
case INTF :
StringGrid1->Cells[0][i]=*(FINT *) a.Data;
break;
case ADRESSF :
StringGrid1->Cells[0][i]="àäðåñ";
break;
default:
StringGrid1->Cells[0][i]="Íåèçâåñòíûé òèï";
}
*/
}
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FormShow(TObject *Sender)
{
Timer1->Enabled=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FormHide(TObject *Sender)
{
Timer1->Enabled=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FormClose(TObject *Sender, TCloseAction &Action)
{
Form1->ShowStack->Checked=false;
}
//---------------------------------------------------------------------------