uniface-procscript
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUniface 9.7 ProcScript Reference -- Navigation Skill
Uniface 9.7 ProcScript参考 -- 导航技能
This skill gives you access to the complete official Uniface 9.7 ProcScript reference documentation -- 594 entries across 8 merged category files in . Your role is to look up and read these files when answering ProcScript questions, not to rely on memorized knowledge.
reference/该技能可让你访问完整的官方Uniface 9.7 ProcScript参考文档 -- 包含目录下8个合并分类文件中的594个条目。你的职责是在回答ProcScript相关问题时查阅并读取这些文件,而非依赖记忆中的知识。
reference/What is ProcScript (minimal context)
什么是ProcScript(最小背景信息)
ProcScript is the 4GL scripting language of the Uniface low-code platform. Key traits to keep in mind when reading the docs:
- Semicolons () start comments, not end statements
; - One statement per line (for continuation)
%\ - Fields are referenced as (qualified) or
FIELD.ENTITY(in context)FIELD - Variables: -
$1(scratch),$10(general),$NAME$blocksvariables/endvariables - Lists use gold-semicolon as separator
- holds the result of the last operation (0 = success, <0 = error)
$status - Code lives in triggers (event handlers) attached to components, entities, or fields
ProcScript是Uniface低代码平台的4GL脚本语言。阅读文档时需要记住的核心特点:
- 分号()用于开启注释,而非结束语句
; - 每行一条语句(使用进行换行续接)
%\ - 字段引用格式为(限定格式)或
FIELD.ENTITY(上下文内使用)FIELD - 变量:-
$1(临时变量)、$10(通用变量)、$NAME$代码块定义的变量variables/endvariables - 列表使用gold分号作为分隔符
- 存储上一次操作的结果(0 = 成功,<0 = 错误)
$status - 代码存放在附加到组件、实体或字段的triggers(事件处理器)中
Documentation layout
文档结构
All documentation is in relative to this skill. Each category is a single merged file containing all entries separated by horizontal rules:
reference/---reference/
llms.txt # Index: every entry with title + one-line description (~620 lines)
procstatements.md # 173 entries -- statements (retrieve, read, store, if, for, putitem, ...)
procfunctions.md # 248 entries -- functions ($status, $concat, $scan, $replace, $date, ...)
triggersstandard.md # 74 entries -- standard triggers (Read, Write, Store, Validate Field, ...)
triggersextended.md # 34 entries -- extended triggers (OnClick, OnChange, expand, ...)
procdatatypes.md # 21 entries -- data types (string, numeric, date, struct, handle, ...)
procprecomp.md # 23 entries -- preprocessor directives (#define, #if, #include, ...)
procstructfunctions.md # 13 entries -- struct functions ($name, $parent, $scalar, $tags, ...)
predefinedoperations.md # 8 entries -- predefined operations (Exec, Init, Cleanup, Quit, ...)Each entry starts with and includes the full reference content: syntax, parameters, return values, usage notes, and code examples. Entries are separated by .
# Title---所有文档存放在该技能相对路径的目录下。每个分类是一个单独的合并文件,所有条目通过水平分隔线隔开:
reference/---reference/
llms.txt # Index: every entry with title + one-line description (~620 lines)
procstatements.md # 173 entries -- statements (retrieve, read, store, if, for, putitem, ...)
procfunctions.md # 248 entries -- functions ($status, $concat, $scan, $replace, $date, ...)
triggersstandard.md # 74 entries -- standard triggers (Read, Write, Store, Validate Field, ...)
triggersextended.md # 34 entries -- extended triggers (OnClick, OnChange, expand, ...)
procdatatypes.md # 21 entries -- data types (string, numeric, date, struct, handle, ...)
procprecomp.md # 23 entries -- preprocessor directives (#define, #if, #include, ...)
procstructfunctions.md # 13 entries -- struct functions ($name, $parent, $scalar, $tags, ...)
predefinedoperations.md # 8 entries -- predefined operations (Exec, Init, Cleanup, Quit, ...)每个条目以开头,包含完整的参考内容:语法、参数、返回值、使用说明和代码示例。条目之间用分隔。
# Title---How to answer ProcScript questions
如何回答ProcScript问题
Follow this lookup strategy. Always consult the docs -- do not answer from memory alone.
遵循以下查询策略。务必查阅文档 -- 不要仅靠记忆回答。
Step 1: Identify what the user needs
步骤1:明确用户需求
Map the user's question to a category file:
| User asks about... | Look in |
|---|---|
| A statement (retrieve, read, store, if, for, putitem, creocc, ...) | |
A | |
| A trigger (Read, Write, Store, Validate, Leave Field, ...) | |
| An extended/widget trigger (OnClick, OnChange, expand, ...) | |
| A data type (string, numeric, date, struct, handle, ...) | |
| Preprocessor (#define, #if, #include, compile-time constants) | |
| Struct operations ($name, $parent, $scalar, $tags, ...) | |
| Predefined operations (Exec, Init, Cleanup, Quit, ...) | |
将用户的问题映射到对应的分类文件:
| 用户询问... | 查阅文件 |
|---|---|
| 语句(retrieve, read, store, if, for, putitem, creocc, ...) | |
| |
| 触发器(Read, Write, Store, Validate, Leave Field, ...) | |
| 扩展/组件触发器(OnClick, OnChange, expand, ...) | |
| 数据类型(string, numeric, date, struct, handle, ...) | |
| 预处理器指令(#define, #if, #include, 编译期常量) | |
| Struct操作($name, $parent, $scalar, $tags, ...) | |
| 预定义操作(Exec, Init, Cleanup, Quit, ...) | |
Step 2: Find the entry within the file
步骤2:在文件中查找条目
Option A -- Grep for the entry heading (fastest, when you know the name):
Grep: pattern="^# retrieve$" path="reference/procstatements.md" -A 80This returns the entry and the following lines. Read until you hit the next separator or .
---# NextTitleOption B -- Search the index (when unsure of the exact name):
Read to find the entry name and its category file. Each section lists the file:
reference/llms.txtundefined选项A -- 搜索条目标题(知道名称时最快):
Grep: pattern="^# retrieve$" path="reference/procstatements.md" -A 80这会返回条目及其后续行。读取内容直到遇到下一个分隔符或为止。
---# 下一个标题选项B -- 搜索索引(不确定确切名称时):
读取来查找条目名称及其所属的分类文件。每个部分都会列出对应的文件:
reference/llms.txtundefinedStatements
Statements
File:
procstatements.md- retrieve: Activate the Read trigger for the first outermost entity...
**Option C -- Grep across all files** (for cross-cutting questions):
Grep: pattern="your search term" path="reference/" glob="*.md"
This is useful for questions like "which statements support the /lock option?" or "where is $webinfo used?".File:
procstatements.md- retrieve: Activate the Read trigger for the first outermost entity...
**选项C -- 全文件搜索**(跨领域问题时):
Grep: pattern="your search term" path="reference/" glob="*.md"
这种方式适用于类似“哪些语句支持/lock选项?”或“$webinfo在哪里使用?”这类问题。Step 3: Read and synthesize
步骤3:阅读并整合信息
- Use Grep with (after context) to read the entry. Typically
-Ais enough for one entry; increase if the entry is longer-A 80 - Pay attention to: syntax, parameters, return values, use restrictions, and code examples
- Check the Related Topics section at the bottom of each entry for connected concepts
- If the question spans multiple topics, grep multiple entries and synthesize
- Always cite which file and entry you consulted
- 带(后续上下文)参数使用Grep读取条目。通常
-A足够覆盖单个条目,如果条目较长可以增加数值-A 80 - 重点关注:语法、参数、返回值、使用限制和代码示例
- 查看每个条目底部的相关主题部分了解关联概念
- 如果问题涉及多个主题,搜索多个条目并整合内容
- 务必标注你查阅的文件和条目名称
Step 4: Respond with precision
步骤4:精准回复
- Quote exact syntax from the docs
- Include code examples from the docs (they use fenced blocks)
```procscript - Mention return values and error codes when relevant
$status - If the docs mention restrictions (component types, trigger contexts), include them
- When the user's question is ambiguous, list the possible interpretations with entry references
- 引用文档中的准确语法
- 包含文档中的代码示例(使用围栏块)
```procscript - 相关情况下需提及返回值和错误码
$status - 如果文档提到限制(组件类型、触发器上下文等),请一并说明
- 当用户问题存在歧义时,列出可能的解读并附上对应的条目参考
Common lookup patterns
常见查询场景
"How do I do X?" (task-oriented)
"我该如何实现X?"(任务导向)
- Search for keywords related to the task
reference/llms.txt - Grep the most relevant entries from the appropriate category file
- Check if the task involves a specific event context
reference/triggersstandard.md - Combine findings into a coherent answer with code examples from the docs
- 在中搜索与任务相关的关键词
reference/llms.txt - 在对应的分类文件中搜索最相关的条目
- 如果任务涉及特定事件上下文,查阅
reference/triggersstandard.md - 整合查找结果,结合文档中的代码示例给出连贯的回答
"What does X do?" (reference lookup)
"X的作用是什么?"(参考查询)
- Grep directly for the entry: in the appropriate category file
pattern="^# X$" - Read and present: syntax, description, parameters, return values, examples
- 直接在对应的分类文件中搜索条目:
pattern="^# X$" - 读取并展示:语法、描述、参数、返回值、示例
"What's wrong with this code?" (debugging)
"这段代码有什么问题?"(调试)
- Identify which statements/functions the code uses
- Grep each one's entry, paying attention to:
- Correct syntax (the docs show exact syntax templates)
- Valid trigger contexts (some statements are only valid in specific triggers)
- Return values and error conditions
- Common gotchas mentioned in the "Use" or "Description" sections
- 识别代码使用了哪些语句/函数
- 搜索每个条目的内容,重点关注:
- 正确语法(文档给出了准确的语法模板)
- 有效触发器上下文(部分语句仅在特定触发器中有效)
- 返回值和错误条件
- "使用"或"描述"部分提到的常见陷阱
"What are all the X?" (enumeration)
"所有的X都有哪些?"(枚举)
- Read and filter by the relevant section header
reference/llms.txt - Or Grep with a broad pattern across the relevant category file
- 读取并按相关的章节标题过滤
reference/llms.txt - 或者在相关分类文件中使用宽泛的模式进行搜索
Important caveats
重要注意事项
- Generated files: The directory is regenerated by
reference/fromdoc/scripts/convert.pysources -- do not edit these files manually.doc/html/ - Merged format: Each file contains multiple entries separated by
.md. Use Grep with---context to read individual entries.-A - Encoding: Source files are Windows-1252; generated output is UTF-8.
- Version: This documentation covers Uniface 9.7 specifically. Do not assume features from other versions.
- 生成文件:目录是由
reference/从doc/scripts/convert.py源文件生成的 -- 不要手动编辑这些文件doc/html/ - 合并格式:每个文件包含多个通过
.md分隔的条目。使用带---上下文参数的Grep读取单个条目-A - 编码:源文件编码为Windows-1252;生成的输出文件编码为UTF-8
- 版本:本文档专门针对Uniface 9.7版本。不要假设其他版本也具备对应功能