Skip to content

Commit b035e8a

Browse files
Merge branch 'Release' into feature/XSharpCompiler
2 parents ca5cf92 + f805230 commit b035e8a

File tree

163 files changed

+3627
-3259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+3627
-3259
lines changed

docs/Help_ZH-CN/Maps/table_of_contents.xml

+243-243
Large diffs are not rendered by default.
+16-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<?xml-stylesheet type="text/xsl" href="../helpproject.xsl" ?>
3-
<topic template="Default" lasteditedby="robert" version="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
3+
<topic template="Default" modified="2024-06-10T20:35:42.672+08:00" lasteditedby="Design" version="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
44
<title>ARRAY (FoxPro)</title>
55
<body>
66
<header>
77
<para styleclass="Heading1">ARRAY (FoxPro)</para>
88
</header>
9-
<para styleclass="Normal">The FoxPro dialect in X# has its own Array type. This type is not declared with an AS keyword, but the array type is derived from the context.<br/>The following lines of code all generate a FoxPro compatible array:</para>
109
<para styleclass="Normal"></para>
11-
<para styleclass="Code Example"><text style="font-weight:bold; font-style:normal; color:#ff0000;">LOCAL</text><text style="font-weight:normal; font-style:normal; color:#000000;">&#32;</text><text style="font-weight:bold; font-style:normal; color:#ff0000;">ARRAY</text><text style="font-weight:normal; font-style:normal; color:#000000;"> aTest(1,2) &#160; &#160; &#160;</text><text style="font-weight:bold; font-style:italic; color:#339966;">// LOCAL ARRAY</text><br/><text style="font-weight:bold; font-style:normal; color:#ff0000;">PUBLIC</text><text style="font-weight:normal; font-style:normal; color:#000000;">&#32;</text><text style="font-weight:bold; font-style:normal; color:#ff0000;">ARRAY</text><text style="font-weight:normal; font-style:normal; color:#000000;"> aPublicArray[10] &#160; </text><text style="font-weight:bold; font-style:italic; color:#339966;">// PUBLIC ARRAY</text><br/><text style="font-weight:bold; font-style:normal; color:#ff0000;">DIMENSION</text><text style="font-weight:normal; font-style:normal; color:#000000;"> AnotherArray(3,4) &#160; </text><text style="font-weight:bold; font-style:italic; color:#339966;">// DIMENSION with parentheses , but angled brackets are supported too</text><br/><text style="font-weight:bold; font-style:normal; color:#ff0000;">DECLARE</text><text style="font-weight:normal; font-style:normal; color:#000000;"> ThirdArray[10] &#160; &#160; &#160;</text><text style="font-weight:bold; font-style:italic; color:#339966;">// DIMENSION with angled brackets, but parentheses are supported too</text></para>
12-
<para styleclass="Normal">The elements of a Foxpro compatible array are all USUAL.<br/>FoxPro arrays cannot be dynamically sized with AAdd(). To resize them you need to add a DIMENSION statement with new dimensions.</para>
13-
<para styleclass="Normal">Internally FoxPro arrays are single dimensional arrays. But you can also (re)dimension them as two dimensional. <br/>So the 3rd array in this example can also be treated as a single dimensional array of 12 elements.</para>
10+
<para styleclass="Normal">X# 中的 FoxPro 方言有自己的 Array 类型。这种类型不是用 AS 关键字声明的,而是根据上下文推导出数组类型。</para>
1411
<para styleclass="Normal"></para>
15-
<para styleclass="Normal">We advise to use angled brackets to access elements of a FoxPro array. This is not ambiguous and the compiler can resolve that at compile time.</para>
16-
<para styleclass="Normal">If you want to use parentheses to access FoxPro array elements you need to enable the <link displaytype="text" defaultstyle="true" type="topiclink" href="opt-fox2">/fox </link>compiler option. This compiler option also enables the behavior that assigning a single value to a FoxPro array will result in assigning that value to all elements in the array.</para>
12+
<para styleclass="Normal">以下代码行都生成兼容 FoxPro 的数组:</para>
13+
<para styleclass="Code Example"><text style="font-weight:bold; font-style:normal; color:#ff0000;">LOCAL</text><text style="font-weight:normal; font-style:normal; color:#000000;">&#32;</text><text style="font-weight:bold; font-style:normal; color:#ff0000;">ARRAY</text><text style="font-weight:normal; font-style:normal; color:#000000;"> aTest(1,2) &#160; &#160; &#160;</text><text style="font-weight:bold; font-style:italic; color:#339966;">// LOCAL ARRAY</text><br/><text style="font-weight:bold; font-style:normal; color:#ff0000;">PUBLIC</text><text style="font-weight:normal; font-style:normal; color:#000000;">&#32;</text><text style="font-weight:bold; font-style:normal; color:#ff0000;">ARRAY</text><text style="font-weight:normal; font-style:normal; color:#000000;"> aPublicArray[10] &#160; </text><text style="font-weight:bold; font-style:italic; color:#339966;">// PUBLIC ARRAY</text><br/><text style="font-weight:bold; font-style:normal; color:#ff0000;">DIMENSION</text><text style="font-weight:normal; font-style:normal; color:#000000;"> AnotherArray(3,4) &#160; </text><text style="font-weight:bold; font-style:italic; color:#339966;">// DIMENSION 也支持方括号</text><br/><text style="font-weight:bold; font-style:normal; color:#ff0000;">DECLARE</text><text style="font-weight:normal; font-style:normal; color:#000000;"> ThirdArray[10] &#160; &#160; &#160;</text><text style="font-weight:bold; font-style:italic; color:#339966;">// DECLARE 使用方括号,但也支持使用括号</text></para>
14+
<para styleclass="Normal">FoxPro 兼容数组的元素都是 USUAL 类型的。<br/>FoxPro 数组不能使用 AAdd() 动态调整大小。要调整它们的大小,需要使用 DIMENSION 语句和新的维度。</para>
15+
<para styleclass="Normal">在内部,FoxPro 数组是单维数组。但也可以将它们重新定义为二维数组。<br/>因此,这个示例中的第三个数组也可以被视为包含 12 个元素的单维数组。</para>
1716
<para styleclass="Normal"></para>
18-
<para styleclass="Normal">Internally FoxPro arrays are implemented as a class that derives from the generic XBase array type.</para>
19-
<para styleclass="Normal">So all functions in the X# runtime that take an array as parameter will also accept a FoxPro array.<br/>When there is different behavior between the FoxPro implementation of a function or the Xbase implementation then this will be handled at runtime.</para>
20-
<para styleclass="Heading3">Implementation</para>
21-
<para styleclass="Normal">The ARRAY type is implemented in the class XSharp.__FoxArray. </para>
22-
<para styleclass="Normal">The Usualtype of ARRAY has the value 5</para>
17+
<para styleclass="Normal">建议使用尖括号来访问 FoxPro 数组的元素。这样不会产生歧义,编译器可以在编译时解析。</para>
18+
<para styleclass="Normal">如果想要使用括号来访问 FoxPro 数组元素,需要启用 <link displaytype="text" defaultstyle="true" type="topiclink" href="opt-fox2">/fox</link> &#160;编译选项。此编译选项还会启用将单个值分配给 FoxPro 数组的所有元素的行为。</para>
19+
<para styleclass="Normal"></para>
20+
<para styleclass="Normal">在内部,FoxPro 数组是作为从通用 XBase 数组类型派生的类实现的。</para>
21+
<para styleclass="Normal">因此,X# 运行时中接受数组作为参数的所有函数也将接受 FoxPro 数组。<br/>当函数的 FoxPro 实现与 Xbase 实现之间存在不同行为时,这将在运行时处理。</para>
22+
<para styleclass="Normal"></para>
23+
<para styleclass="Heading3">实现</para>
24+
<para styleclass="Normal">ARRAY 类型在类 XSharp.__FoxArray 中实现。</para>
25+
<para styleclass="Normal"></para>
26+
<para styleclass="Normal">ARRAY 的 Usualtype 值为 5</para>
2327
</body>
2428
</topic>

docs/Help_ZH-CN/Topics/ARRAY.xml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<?xml-stylesheet type="text/xsl" href="../helpproject.xsl" ?>
3-
<topic template="Default" lasteditedby="robert" version="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
3+
<topic template="Default" modified="2024-06-04T23:12:48.339+08:00" lasteditedby="Design" version="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
44
<title>ARRAY</title>
55
<keywords>
66
<keyword>ARRAY</keyword>
@@ -9,9 +9,12 @@
99
<header>
1010
<para styleclass="Heading1">ARRAY</para>
1111
</header>
12-
<para styleclass="Normal">The ARRAY type is a dynamic array of USUAL values. Each element of the array may contain another array, so arrays can be multidimensional.</para>
13-
<para styleclass="Heading3">Implementation</para>
14-
<para styleclass="Normal">The ARRAY type is implemented in the class XSharp.__Array. </para>
15-
<para styleclass="Normal">The Usualtype of ARRAY has the value 5</para>
12+
<para styleclass="Normal"></para>
13+
<para styleclass="Normal">ARRAY 类型是由 USUAL 值组成的动态数组。数组的每个元素都可以包含另一个数组,因此数组可以是多维的。</para>
14+
<para styleclass="Normal"></para>
15+
<para styleclass="Heading3">实现</para>
16+
<para styleclass="Normal">ARRAY 类型在 XSharp.__Array 类中实现。</para>
17+
<para styleclass="Normal"></para>
18+
<para styleclass="Normal">ARRAY 的 Usualtype 值为 5。</para>
1619
</body>
1720
</topic>

0 commit comments

Comments
 (0)