欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

C語言

當(dāng)前位置:主頁 > 軟件編程 > C語言 >

c語言實(shí)現(xiàn)簡單的易語言

來源:本站原創(chuàng)|時(shí)間:2020-01-10|欄目:C語言|點(diǎn)擊: 次

大家熟知的易語言底層其實(shí)就是c語言來實(shí)現(xiàn)的,c語言的32個(gè)關(guān)鍵字加上一些常用的其他,使用#define這種宏定義來實(shí)現(xiàn)簡單的漢語替換

1.下面就先打開VisualStudio,在頭文件目錄下新建一個(gè) 標(biāo)識(shí)符.h 的文件,開始宏定義封裝我們的易語言

//auto 局部變量(自動(dòng)儲(chǔ)存)
#define 自動(dòng) auto
//break無條件退出程序最內(nèi)層循環(huán)
#define 中斷 break 
//case  switch語句中選擇項(xiàng)
#define 情況 case
//char單字節(jié)整型數(shù)據(jù)
#define 字符 char
//const定義不可更改的常量值
#define 常量 const
//continue中斷本次循環(huán),并轉(zhuǎn)向下一次循環(huán)
#define 繼續(xù) continue
//default switch語句中的默認(rèn)選擇項(xiàng)
#define 默認(rèn) default
//do 用于構(gòu)成do.....while循環(huán)語句
#define 執(zhí)行 do
//double定義雙精度浮點(diǎn)型數(shù)據(jù)
#define 雙精度 double
//else構(gòu)成if.....else選擇程序結(jié)構(gòu)
#define 否則 else
//enum枚舉
#define 枚舉 enum
//extern在其它程序模塊中說明了全局變量
#define 外部變量 extern
//float定義單精度浮點(diǎn)型數(shù)據(jù)
#define 單精度 float
//for構(gòu)成for循環(huán)語句
#define 循環(huán) for
//goto構(gòu)成goto轉(zhuǎn)移結(jié)構(gòu)
#define 跳轉(zhuǎn) goto
//if構(gòu)成if....else選擇結(jié)構(gòu)
#define 如果 if
//int基本整型數(shù)據(jù)
#define 整數(shù) int
//long長整型數(shù)據(jù)
#define 長整型 long
//registerCPU內(nèi)部寄存的變量
#define 寄存變量 register
//return用于返回函數(shù)的返回值
#define 返回 return
//short短整型數(shù)據(jù)
#define 短整型 short
//signed有符號(hào)數(shù)
#define 有符號(hào) signed
//sizoef計(jì)算表達(dá)式或數(shù)據(jù)類型的占用字節(jié)數(shù)
#define 求大小 sizeof
//static定義靜態(tài)變量
#define 靜態(tài) static
//struct定義結(jié)構(gòu)類型數(shù)據(jù)
#define 結(jié)構(gòu)體 struct
//switch構(gòu)成switch選擇結(jié)構(gòu)
#define 選擇 switch
//typedef重新定義數(shù)據(jù)類型
#define 重新定義 typedef
//union聯(lián)合類型數(shù)據(jù)
#define 聯(lián)合體 union
//unsigned定義無符號(hào)數(shù)據(jù)
#define 無符號(hào) unsigned
//void定義無類型數(shù)據(jù)
#define 空 void
//volatile該變量在程序中執(zhí)行中可被隱含地改變
#define 隱藏變量 volatile
//while用于構(gòu)成do...while或while循環(huán)結(jié)構(gòu)
#define 當(dāng) while
#define 主函數(shù) main
#include<stdlib.h>
void notepad(){
	system("notepad");
}
#define 記事本 notepad()
void calc(){
	system("calc");
}
#define 計(jì)算器 calc();
void tasklist(){
	system("tasklist");
}
#define 進(jìn)程管理 tasklist();
 
#define 等待 getchar();
void ipconfig(){
	system("ipconfig");
}
#define IP查看器 ipconfig();
#include<stdio.h>
void hello(){
	printf("%s", "hello word");
}
#define 你好世界 hello();

2.在源文件目錄下面新建一個(gè).c文件,引入我們的標(biāo)識(shí)符文件,就可以使用我們的漢語編程了

這里" "和<>的區(qū)別就是一個(gè)引入系統(tǒng)的頭文件,一個(gè)是我們自己的頭文件

#include"elanguage.h"
 
空 主函數(shù)(){
	//計(jì)算器
	進(jìn)程管理
	IP查看器
	你好世界
	等待
}

以上就是相關(guān)的知識(shí)點(diǎn)內(nèi)容,感謝大家對(duì)我們的支持。

上一篇:C語言制作簡易金山打字通功能的代碼

欄    目:C語言

下一篇:C++中mutable與volatile的深入理解

本文標(biāo)題:c語言實(shí)現(xiàn)簡單的易語言

本文地址:http://mengdiqiu.com.cn/a1/Cyuyan/650.html

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有