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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值