⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit1.h

📁 语言编译过程采用一趟扫描方式,以语法分析程序为核心,词法分析程序和代码生成程序都作为一个独立的过程,当语法分析需要读单词时就调用词法分析程序,而当语法分析正确需生成相应的目标代码时,则调用代码生成程序
💻 H
字号:
//---------------------------------------------------------------------------

#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -