Learning the Basics of C51 3 "Keywords and Identifiers"

Publisher:YaqiLatest update time:2015-03-12 Source: laoguKeywords:C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
3 Keywords and Identifiers

    3.1 Keywords Keywords
    are words that are used by Turbo C2.0 itself and cannot be used for other purposes. For example, keywords cannot be used as variable names, function names, etc.
    Turbo C2.0 has the following keywords:
    11 keywords extended by Turbo C2.0
     asm _cs _ds _es _ss cdecl
     far near huge interrupt pascal
    32 keywords defined by ANSI standard
     auto double int struct break else
     long switch case enum register typedef
     char extern return union const float
     short unsigned continue for signed void
     default goto sizeof volatile do if
     while static

    3.2 Identifiers
    Identifiers are constants, variables, statement labels, and user-defined function names. The definition of Turbo C 2.0 identifiers is very flexible. As an identifier, it must meet
the following rules:
    1. All identifiers must start with a letter (a~z, A~Z) or an underscore (_);
    2. The rest of the identifier can be composed of letters, underscores or numbers (0~9);
    3. Uppercase and lowercase letters have different meanings, that is, they represent different identifiers;
    4. Only the first 32 characters of an identifier are valid;
    5. An identifier cannot use Turbo C2.0 keywords.
    Here are some correct and incorrect identifiers:
               Correct Incorrect
               smart 5smart
               _decision bomb?
               key_board key.board
               FLOAT float
Keywords:C51 Reference address:Learning the Basics of C51 3 "Keywords and Identifiers"

Previous article:Learning the Basics of C51 4 "Variables"
Next article:Learn the basics of C51 2 "Data Types"

Recommended ReadingLatest update time:2024-11-23 14:49

Installation and cracking of keil software (can be used for both STM32 and C51)
Teach you how to install and crack Keil software (this article takes Keil4 software as an example) Step 1: Run the mdk.exe software and keep clicking on the default You can modify the path here Step 2: After clicking next, this dialog box will appear. You can enter any number in the first name and email fields.
[Microcontroller]
Installation and cracking of keil software (can be used for both STM32 and C51)
C51 MCU Study Notes Matrix Keyboard
Introduction Matrix keyboards are generally 4 × 4 or 4 × 3. The judgment methods of matrix keyboards are divided into row scanning and column scanning. Simply put, it is to give a high level to the whole, then attach a low level to one end of a button, and then determine whether the other end is a low level. Schem
[Microcontroller]
C51 MCU Study Notes Matrix Keyboard
C51 MCU Study Notes (VI) - How to use the LCD screen
1. Understanding LCD1602 Liquid crystal display is referred to as liquid crystal or LCD. Various types of liquid crystal are usually named according to the number of rows of displayed characters or the rows and columns of the liquid crystal dot matrix. 1602 means that 16 characters are displayed in each row, and a tot
[Microcontroller]
C51 MCU Study Notes (VI) - How to use the LCD screen
"Beginner's C51 Self-study Notes" Stepper Machine
Generally, electric motors rotate continuously, but stepper motors rotate step by step, so they are called stepper motors. The minimum angle that can be rotated each time is called the step angle. Whenever the stepper motor driver receives a drive pulse signal, the stepper motor will rotate a fixed angle in the set
[Microcontroller]
C51 MCU learning mind map
[Microcontroller]
C51 MCU learning mind map
How to use C language and assembly language in KEIL C51
1. Use the preprocessing instructions #asm and #endasm to use assembly language. The assembly language written by the user can be followed immediately after #asm and end before #endasm. As shown below:         # asm         /*Assembly source program*/         #endasm     The statements between #asm and #endasm will be
[Microcontroller]
LCD display c51 single chip microcomputer frequency meter
A topic goal This project uses the 51 series single-chip microcomputer to realize a frequency meter and uses an LCD1602 liquid crystal display to display the measured frequency value. Analysis of the second topic LCD frequency meter is a digital measuring instrument that uses decimal numbers to display the frequen
[Microcontroller]
C51 MCU interrupt recognition
Contains five interrupt sources, two levels of interrupt priority, and programmable priority settings, which can be set through IP: PX0 (IP.0), external interrupt 0 priority setting bit; PT0 (IP.1), timer/counter T0 priority setting bit; PX1 (IP.2), external interrupt 0 priority setting bit; PT1 (IP.3), timer/counte
[Microcontroller]
C51 MCU interrupt recognition
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号