📄 recast.hlp
字号:
{smcl}
{* 24feb2005}{...}
{cmd:help recast}
{hline}
{title:Title}
{p2colset 5 19 21 2}{...}
{p2col :{hi:[D] recast} {hline 2}}Change storage type of variable{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 15 2}{cmd:recast} {it:{help data types:type}} {varlist}
[{cmd:,} {opt force}]
{p 4 6 2}
where {it:type} is {cmd:byte}, {cmd:int}, {cmd:long}, {cmd:float},
{cmd:double}, or {cmd:str}{it:#}.
{title:Description}
{pstd}
{cmd:recast} changes the storage type of the variables identified in
{varlist} to {it:{help data types:type}}.
{title:Options}
{phang}
{cmd:force} makes {cmd:recast} unsafe by causing the variables
to be given the new storage type even if that will cause a loss of precision,
introduction of missing values, or, in the case of a string variables, the
truncation of strings.
{pmore}
{cmd:force} should be used with caution. {cmd:force} is for those
instances where you have a variable saved as a {cmd:double} but would now be
satisfied to have the variable stored as a {cmd:float}, even though that would
lead to a slight rounding of its values.
{title:Examples}
{phang}{cmd:. recast int mpg}{p_end}
{phang}{cmd:. recast float mpg weight displ}
{title:Also see}
{psee}
Manual: {bf:[D] recast}
{psee}
Online: {helpb compress}, {help data types}, {helpb destring}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -