Yi Linguistic Memories (I actually created a language?)

I still remember playing Chinese programming in elementary school, haha, good memories

When I was in elementary school, I didn’t do business, I loved playing computers, and I liked the cool feeling of programming. I came into contact with Yi language and programming in Chinese. It was very interesting.
But, it was for kids. Now I realized that it was just for fun. , Unknowingly, it is already so powerful. I have already arrived at the university and learned a lot of knowledge. Suddenly, I realized my own Chinese programming output helloworld. I won't say more nonsense! ! !

//这是我们第一个接触的C语言程序
#include <stdio.h>
int main(){
    
    
	printf("helloworld!");
	return 0;
}

The following implementation language encapsulation

//写一个头文件,我命名成el.h,后期功能多的话,我想命名成io.h
#include<stdio.h>//既然实现输出那当然要包含这个
#define 整型 int
#define double 双精度小数
#define float 单精度小数
#define 主函数 main
#define 输出 printf
#define 开始 {
    
    
#define 结束 }
#define 返回值 return
//咱就演示一下,如果感兴趣的大神自然可以更完善

In fact, there is nothing to do with the macro definition and header files, write functions or objects, and then use the macro definition to change the name to achieve Chinese.

#include "el.h"
整型 主函数()
开始
	输出("helloworld");
	返回值 0 ;
结束

Run output:
Insert picture description here
Okay, let’s stop here, I’m Goudan, you can implement the follow-up functions yourself

Guess you like

Origin blog.csdn.net/lspdd/article/details/113052665