⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mf_sizeof.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 19nov2004}{...}
{cmd:help mata sizeof()}
{hline}
{* index sizeof()}{...}

{title:Title}

{p 4 8 2}
{bf:[M-5] sizeof() -- Number of bytes consumed by object}


{title:Syntax}

{p 8 12 2}
{it:real scalar}
{cmd:sizeof(}{it:transmorphic matrix A}{cmd:)}


{title:Description}

{p 4 4 2}
{cmd:sizeof(}{it:A}{cmd:)} 
returns the number of bytes consumed by {it:A}.


{title:Remarks}

{p 4 4 2}
{cmd:sizeof(}{it:A}{cmd:)} 
returns the same number as shown by 
{bf:{help mata_describe:[M-3] mata describe}}.

{p 4 4 2}
A 500 {it:x} 5 real matrix consumes 20,000 bytes:

	: {cmd:sizeof(mymatrix)}
	  20000

{p 4 4 2}
A 500 {it:x} 5 view matrix, however, consumes only 24 bytes:

	: {cmd:sizeof(myview)}
	  24

{p 4 4 2}
To obtain the number of bytes consumed by a function, pass a 
dereferenced function pointer:

	: {cmd:sizeof(*&myfcn())}
	  320


{title:Conformability}

    {cmd:sizeof(}{it:A}{cmd:)}:
		{it:A}:  {it:r x c}
	   {it:result}:  1 {it:x} 1


{title:Diagnostics}

{p 4 4 2}
The number returned by {cmd:sizeof(}{it:A}{cmd:)} does not include any
overhead, which usually amounts to 64 bytes, but can be less (as small 
as zero in the case of recently used scalars).

{p 4 4 2}
If {it:A} is a pointer matrix, the number returned reflects the amount of 
memory required to store {it:A} itself, and does not include the memory 
consumed by its siblings.


{title:Source code}

{p 4 4 2}
Function is built-in.


{title:Also see}

{p 4 13 2}
Manual:  {hi:[M-5] sizeof()}

{p 4 13 2}
Online:  help for 
{bf:{help m4_programming:[M-4] programming}}
{p_end}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -