如何把常量转为变量
解决方案 »
- 能否写个通用的显示Form的函数(Delphi XE) ?
- 哪位大侠有屏蔽输入法的代码,帮帮小妹。
- 关于inherited的一个小小问题(出血者的)
- quickreport如何编程保存为qrp文件,并从文件中读取啊?
- 挪威的土豆请进
- 格式问题
- 一个有关sql语句的问题??
- 请问往数据库里添加,删除修改数据的代码怎么写?一般我都用DBNavigator的,这次我用buttens了。
- RMb求助软件界面配色贴图方案!!!!!!!
- 谁有DevExpress Bar 3.1 ?
- 超高难度-->有谁做过类似编译程序的词法语法解析器?或哪有现成的控件下载?
- 怎么才能够将图片存放到Paradox数据库中呀?
const
A: Integer = 10;
使用中可以进行赋值.
Syntax {$J+} or {$J-}
{$WRITEABLECONST ON} or {$WRITEABLECONST OFF}
Default {$J+}
{$WRITEABLECONST ON}
Scope Local
The $J directive controls whether typed constants can be modified or not. In the {$J+} state, typed constants can be modified, and are in essence initialized variables. In the {$J-} state, typed constants are truly constant, and any attempt to modify a typed constant causes the compiler to report an error.
In previous versions of Delphi and Borland Pascal, typed constants were always writeable, corresponding to the {$J+} state. Old source code that uses writeable typed constants must be compiled in the {$J+} state, but for new applications it is recommended that you use initialized variables and compile your code in the {$J-} state.