<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>fixed</title>
	<atom:link href="https://www.aitaocui.cn/tag/233626/feed" rel="self" type="application/rss+xml" />
	<link>https://www.aitaocui.cn</link>
	<description>翡翠玉石爱好者聚集地</description>
	<lastBuildDate>Sun, 27 Nov 2022 03:32:21 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>

<image>
	<url>https://www.aitaocui.cn/wp-content/uploads/2022/11/taocui.png</url>
	<title>fixed</title>
	<link>https://www.aitaocui.cn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>fixed(计算机专业术语)</title>
		<link>https://www.aitaocui.cn/article/345433.html</link>
					<comments>https://www.aitaocui.cn/article/345433.html#respond</comments>
		
		<dc:creator><![CDATA[史蒂芬周]]></dc:creator>
		<pubDate>Sun, 27 Nov 2022 03:32:21 +0000</pubDate>
				<category><![CDATA[知识]]></category>
		<category><![CDATA[fixed]]></category>
		<guid isPermaLink="false">https://www.aitaocui.cn/?p=345433</guid>

					<description><![CDATA[fixed是一个计算机专业术语，指向托管变量的指针并在statement执行期间“钉住”该变量。 简介 （一）它的目的是防止变量被垃圾回收器生定位。fixed语句只能出现在不安全的...]]></description>
										<content:encoded><![CDATA[</p>
<article>
<p>fixed是一个计算机专业术语，指向托管变量的指针并在statement执行期间“钉住”该变量。</p>
</article>
<article>
<h1>简介</h1>
<p>（一）它的目的是防止变量被垃圾回收器生定位。fixed语句只能出现在不安全的上下文中。Fixed还可用于创建固定大小的缓冲区。</p>
<p>fixed语句设置指向托管变量的指针并在执行期间“钉住”该变量。如果没有fixed语句，则指向可移动托管变量的指针的作用很小，因为垃圾回收可能不可预知地重定位变量。C#编译器只允许在fixed语句中分配指向托管变量的指针。</p>
<h1>示例</h1>
<p>// statements_fixed.cs// compile with: /unsafeusing System;class Point{ public int x, y; }class FixedTest { // Unsafe method: takes a pointer to an int. unsafe static void SquarePtrParam (int* p) { *p *= *p; } unsafe static void Main() { Point pt = new Point(); pt.x = 5; pt.y = 6; // Pin pt in place: fixed (int* p = &amp;pt.x) { SquarePtrParam (p); } // pt now unpinned Console.WriteLine (&quot;{0} {1}&quot;, pt.x, pt.y); }}</p>
<p>（二）Fixed函数:按指定的位数进行四舍五入得到文本型的数值,如果其第二个参数是正数是在小数点的右侧进行四舍五入,反之在小数点的左侧,第三个参数决定其是否用千位分隔符</p>
<h1>应用</h1>
<p>将数字按指定的小数位数进行取整，利用句号和逗号以十进制格式对该数进行格式设置，并以文本形式返回结果。</p>
<h1>注意事项</h1>
<p>在 Microsoft Excel 中Numbers的最大有效位数不能超过15位，但decimals可达到127。</p>
<p>如果decimals为负数，则number在小数点左侧进行舍入。</p>
<p>如果省略 decimals，则假设其值为2。</p>
<p>如果no_commas为FALSE或被省略，则返回的文本会像通常一样包含逗号。</p>
<p>使用命令（在 “开始”选项卡上的 “数字”组中，单击 “数字”旁边的箭头，然后单击“数字”）格式化包含数字的单元格与直接使用函数 FIXED 格式化数字的主要区别在于：函数 FIXED 将其结果转换成 文本，而用“单元格”命令设置格式的数字仍然是数字。</p>
</article>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aitaocui.cn/article/345433.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
