unit1.h

来自「语言编译过程采用一趟扫描方式,以语法分析程序为核心,词法分析程序和代码生成程序都」· C头文件 代码 · 共 74 行

H
74
字号
//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <stdio.h>
#include <ExtCtrls.hpp>
#include <Dialogs.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TGroupBox *GroupBox1;
        TMemo *Memo1;
        TGroupBox *GroupBox2;
        TButton *ButtonRun;
        TButton *Button2;
        TGroupBox *GroupBox3;
        TButton *OpenFile;
        TEdit *EditName;
        TGroupBox *GroupBox4;
        TLabel *Label1;
        TLabel *Label2;
        TLabel *Label3;
        TLabel *Label4;
        TLabel *Label5;
        TOpenDialog *OpenDialog;
        TRadioGroup *ListSwitch;
        void __fastcall Button2Click(TObject *Sender);
        void __fastcall ButtonRunClick(TObject *Sender);
        void __fastcall OpenFileClick(TObject *Sender);
private:	// User declarations
public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
        void __fastcall printfs(char* s);
    void __fastcall printcs(char c);
    void __fastcall printls(char *s0, long v);
    void __fastcall printrs(char *s0, float v);
    void __fastcall prinths(char* s0, short v);

};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::printfs(char* s) {
    Memo1->Lines->Add(s);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::printcs(char c) {
    Memo1->Lines->Add(c);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::printls(char *s0, long v) {
    Memo1->Lines->Add(s0 + IntToStr(v));
}
//---------------------------------------------------------------------------
void __fastcall TForm1::printrs(char *s0, float v) {
    Memo1->Lines->Add(s0 + FloatToStr(v));
}
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?