惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
云风的 BLOG
云风的 BLOG
美团技术团队
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
GbyAI
GbyAI
雷峰网
雷峰网
P
Proofpoint News Feed
IT之家
IT之家
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
T
The Blog of Author Tim Ferriss
月光博客
月光博客
V
Visual Studio Blog
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
T
Troy Hunt's Blog
Project Zero
Project Zero
U
Unit 42
T
Tor Project blog
Scott Helme
Scott Helme
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
I
InfoQ
Cloudbric
Cloudbric
P
Proofpoint News Feed
The Cloudflare Blog
H
Heimdal Security Blog
Google DeepMind News
Google DeepMind News
The GitHub Blog
The GitHub Blog
Attack and Defense Labs
Attack and Defense Labs
有赞技术团队
有赞技术团队
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
博客园 - 【当耐特】
Security Latest
Security Latest
The Register - Security
The Register - Security
F
Fortinet All Blogs
I
Intezer
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
NISL@THU
NISL@THU
T
Tenable Blog

博客园 - 云水浮萍

结构体和类中属性定义需要static地方 群里人问的消息切换分页问题,我就标记一下 AnsiString类型定义的时候可以直接指定代码页,比如950繁体字,936日文 CopyMemory Move使用笔记 System.Length 函数 Delphi Helper Record Class 向量定义笔记 关于日期与字符串转换时出错的分隔符,小记一下容易忘记 类型与泛型标记 http://docwiki.embarcadero.com/RADStudio/XE7/en/Delphi_Data_Types Delphi中GUID相等检查中经典指针应用 test是否被执行? 每次看到某个数据结构的时候,有两个指针,一个起始,一个结束,一直没想明白为何是起始与结束,不是起始加数量,是怎么操作的? 给自己一个书单 pureMVC学习之一 泛型与无聊 队列与DelphiXe新语法 猫儿山之行计划书 一个错误,一个教训,关于堆栈平衡 - 云水浮萍 - 博客园
十万个为什么收集
云水浮萍 · 2015-04-18 · via 博客园 - 云水浮萍

1、类型常量是什么?与常量、变量有什么区别?

const x=5; //常量

{$J+}//允许对变量赋值

const y:Integer=5;//类型常量

{$J-}

  Delphi7下@x查看地址会提示:Variable required

               @y则正常

浪费好多时间,没测试完全,下面全是猜的,x做为资源编译进exe,每次启动地址是固定的 y只是一个变量存在,根据申明位置(全局或过程内)确定了生存周期,它是在栈上的

使用{$J+}可修改这种常量,其实单例模式就这么干的。另外xe7我记得可以申明 class var 不知道有没有class const,有空的时候再来测试,先标记一下。