概述:
  ^: 指针
  @: 取址
  #: 十进制符
  $: 十六进制符
 
@:取址运算符;
var
  int:integer;
  p:^integer;
begin
  new(P);
  int:=24;
  p:=@int;
  dispose(P);
end;
 
^:指针的引用解析操作符;
var
  pint:^integer;
begin
  new(pint);
  showmessage(inttohex(integer(@pint),8));
  pint^:=$ff;
  showmessage(inttohex(pint^,4));
end;
 
#:ASCII码值表示符;
const
  tab_key=#9;//TAB键的ASCII值
 
符号 ^ 有两种用途,当它出现在类型标识符之前,如^typeName,表示一个类型,该类型表示指向typeName类型变量的指针;当它出现在指针变量之后,如pointer^,该符号对指针解除参照,也就是说,返回存储在内存地址(该地址保存在指针中)的值指针,指向的数据.
var
  I: Integer;
  PI: ^Integer; 
begin
  I := 10
  PI := @I;;
  PI^ := 20;
  I := PI^;
end;
 
取指针的方法,比如y:=p^; 就是指为Y赋值指针P

随机推荐

  1. python encode decode unicode区别及用法

    decode 解码 encode 转码 unicode是一种编码,具体可以百度搜 # coding: UTF-8 u = u'汉' print repr(u) # u'\u6c49' s = u.en ...

  2. 在Unity项目中使用Git

    (搬运自我在SegmentFault的博客) 本文参考了Unity官网的Mastering Unity Project Folder Structure - Version Control Syste ...

  3. linux C 管道

    单一进程使用管道基本上毫无意义.管道一般用来子进程和父进程之间的通信,或者兄弟进程间的通信. 创建管道的主要函数是pipe #include<unistd.h> ]) pipe函数创建一个 ...

  4. Resource is out of sync with the file system

    Resource is out of sync with the file system解决办法: 在eclipse或mycelipse中,启动run on server时或查看项目文件时报错:Res ...

  5. 数据密集型 和 cpu密集型 event loop

    Node.js在官网上是这样定义的:“一个搭建在Chrome JavaScript运行时上的平台,用于构建高速.可伸缩的网络程序.Node.js采用的事件驱动.非阻塞I/O模型使它既轻量又高效,是构建 ...

  6. 获取 UIWebView中用户所点击的图片URL

    在使用 UIWebView 的时候 (通常是阅读类的 App),会有点击图片放大的需求,那么可以通过设置 UIWebViewDelegate 来过滤请求,取出图片的 URL 这个方法的前提是 img ...

  7. 【iOS】iOS消息推送机制的实现

    iOS消息推送的工作机制可以简单的用下图来概括: Provider是指某个iPhone软件的Push服务器,APNS是Apple Push Notification Service的缩写,是苹果的服务 ...

  8. php匿名函数小示例

    <?php //$fun = function($params){ // echo $params; //}; // //$fun('aa'); //例一 //在普通函数中定义一个匿名函数 // ...

  9. 关于DataSource的一些记录

    今天看WWDC的232_hd_advanced_user_interfaces_with_collection_views,里面花了一般的时间来讲如何合理的设计程序的datesource,将的很有道理 ...

  10. Java Day 15

    String 字符串对象一旦被初始化就不会被改变  字符串常量池  String s = "abc"; //字符串常量池 String s = new String("a ...