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


Strings 分類: Programming Language

High-level Programming Language (Pascal)

Strings (Sequences of Characters)

String constant

  • is a sequence of characters enclosed in single quotation marks, the quotation marks themselves are not part of the string
  • some examples,

    'Pascal'
    'Programming'
    'Hello, how are you ?'
    'Tom''s computer' (represents the string Tom's computer)

  • declaration of string constant

const Message = 'Error ! Please try again.'

String variable

  • identifier string is a predefined data type in Pascal, can be used to declare string variables in the var declaration part
  • for example,

    var Name : string [25]; {declared as a string variable which can hold up to 25 characters}
      Class : string [2];

    {declared as a string variable which can hold up to 2 characters}

    {the integer enclosed in the square brackets specifies the maximum number of characters in a value for the string variable}

      Address : string; {if the length is not specified, it is assumed a default maximum length of 255 characters}


Subprograms(Subroutines) 分類: Programming Language

High-level Programming Language (Pascal)

Subprograms (also called Subroutines)

  • is a group of statements designed to carry out a specific task
  • there are two types of subprograms : procedures&w......

    (閱讀全文)



Repetition Structure 分類: Programming Language

High-level Programming Language (Pascal)

Repetition Structure

  • makes possible repeated execution of one or more statements until a specified condition is satisfied
  • a repetitive techniq......

    (閱讀全文)



Selection Structure 分類: Programming Language

High-level Programming Language (Pascal)

Selection Structure

  • makes possible the selection of one of a number of alternative actions, depending on the value of a Boolean expression
  • can be&......

    (閱讀全文)



Sequential Structure 分類: Programming Language

High-level Programming Language (Pascal)

Sequential Structure

  • execution of a sequence of statements in the order in which they appear so that each statement is executed exactly once
  • the a......

    (閱讀全文)