c语言帮助文件,PocketC桌面版的原版帮助文件__PocketC语言(完整)Complete PocketC Languag的认识.doc...

本文详细介绍了PocketC编程语言的基础知识,包括大小写敏感性、注释方式、变量类型(如整型、浮点型、字符型和字符串)、全局变量和函数的声明。还提及了表达式、赋值运算符、字符串操作、指针以及预处理器的使用。通过实例展示了如何在PocketC中编写程序。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

PocketC Language

The Title

The Global Variables

The Functions

Expressions

Assignment

Operators

String Character Accessor

Increment / Decrement

Automatic Conversion and Casting

Statements

Statement Examples

Pointers

Include

Using Native Libraries

Special characters

Preprocessor

First, PocketC is a case sensitive language, meaning that typing word is not the same as type Word.

There are three elements to a PocketC applet: the title line, the global variables, and the functions.

The Title

The title is by far the easiest part of the PocketC language. The first line of your applet is two slashes followed by the name of your applet. Example:

// My Applet

This is also known as a comment. Anytime the compiler finds '//' in your applet, it will ignore the rest of the line that it is on. This allows you to place explanatory text in your applet. There is one other way to put a comment in your applet, by surrounding the text with '/* */'. This method allows you to spread a comment out over several lines. Example:

/* This is a multi-line comment.

All the text between the

asterisks is ignored */

Multi-line comments are not nestable. In other words:

/* comment1 /* comment2 */ a=b+c; */

is NOT valid.

The Global Variables

Variables are the things that are used to store values in a program. There are four types of variables in PocketC:

TypeNameExampleinteger (32-bit, signed)int1, 2, 5, -789, 452349floating point (32-bit)float-1.2, 3.141592, 5.7e-4characters (8-bit, signed)char'a', 'b', '#'stringsstring"Bob" "Katie" "Hello"pointerspointerdiscussed laterNote: String constants may only be 1023 characters. To strore a longer string in a variable, use addition: str = "long1..." + "long2...";

Variables are declared like this:variable-type name[,name...];

Here are a few examples:

int myInteger, row, column;

string name;

float pi;

char c, last, first;

pointer ptr;

It is also possible to have an array of values. An array is a list of values that

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值