ICT
the blog for ICT
ken013194
暱稱: ホロ
性別: 男
國家: 香港
地區: 葵青區
« July 2026 »
SMTWTFS
1234
567891011
12131415161718
19202122232425
262728293031
最新文章
Text File
Arrays
String Procedures
String Functions
String Operation
文章分類
全部 (23)
Programming Language (23)
訪客留言
最近三個月尚無任何留言
每月文章
日誌訂閱
尚未訂閱任何日誌
好友名單
尚無任何好友
網站連結
尚無任何連結
最近訪客
最近沒有訪客
日誌統計
文章總數: 23
留言總數: 0
今日人氣: 4
累積人氣: 79
站內搜尋
RSS 訂閱
RSS Feed
2009 年 9 月 11 日  星期五   晴天


Data Type 分類: Programming Language

High-level Programming Language (Pascal)

Data Types

  • determines how the value is represented in the memory
  • Pascal provides a number of predefined data types
  • denoted by the standard identifiers integer, real, boolean, char and reserved word string

    Data Types
    Descriptions
    integer
    • are whole numbers that can be positive, zero or negative
    • no decimal points, blank spaces or commas between digits
    • not all integers can be represented because of the limitation of memory in the computer
    • in Turbo Pascal, the acceptable range of integers is between 32767 and -32768
    • can perform calculation
    real
    • numbers containing decimal points
    • no blank spaces or commas between digits
    • can be expressed in either in decimal notation or in exponential notation for example,
      • (i) 125.2 (in decimal notation)
      • (ii) 1.252E+02 (in exponential notation)
    • real constant must have at least one digit before and after the decimal point
    • can perform calculation
    boolean
    • has two values only : true and false
    • used to represented conditional value and decision-making
    char
    • can be a letter, a numeric digit, a punctuation symbol or a special symbol
    • one of the symbol in ASCII character set
    • consists of a single character enclosed within a pair of single quotation marks e.g. 'A', '8', '+'
    • if the character is an apostrophe ( ' ), it must appear as a pair of apostrophes enclosed within a pair of single quotation marks i.e. ' " '
    • cannot perform calculation directly
    string
    • a sequence of zero or more (up to 255) characters enclosed in a pair of single quotation marks
    • null string contains no character
    • cannot perform calculation directly





訪客留言 (返回 ken013194 的日誌)

訪客名稱:
電郵地址: (不會公開)
驗證碼:  按此更新驗證碼 (如看不清楚驗證碼請點擊圖片刷新)
俏俏話: (必需 登入 後才能使用此功能)
[ 開啟多功能編輯器 ]