如何获取红色动作的完整源代码?
How to get the full source code of an Action in Red?
正如我所见,阅读不是原生的
>> native? :read
== false
但是当我尝试使用
获取源代码时
write-clipboard mold :read
我只读了header
make action! [[
"Reads from a file, URL, or other port"
source [file! url!]
/part {Partial read a given number of units (source relative)}
length [number!]
/seek "Read from a specific position (source relative)"
index [number!]
/binary "Preserves contents exactly"
/lines "Convert to block of strings"
/info
/as {Read with the specified encoding, default is 'UTF-8}
encoding [word!]
]]
我能得到剩下的 body 吗?
native!
和 action!
值的源代码写在 Red/System and part of the low-level runtime library code. They are not implemented in Red itself for sake of performance or because they require access to low-level features not available at Red level. Natives source code have a single entry point which you can find in the runtime/natives.reds file. For actions, it is more complex as they delegate 它们对每种数据类型的实现中。操作基本上是数据类型 类.
的方法
正如我所见,阅读不是原生的
>> native? :read
== false
但是当我尝试使用
获取源代码时write-clipboard mold :read
我只读了header
make action! [[
"Reads from a file, URL, or other port"
source [file! url!]
/part {Partial read a given number of units (source relative)}
length [number!]
/seek "Read from a specific position (source relative)"
index [number!]
/binary "Preserves contents exactly"
/lines "Convert to block of strings"
/info
/as {Read with the specified encoding, default is 'UTF-8}
encoding [word!]
]]
我能得到剩下的 body 吗?
native!
和 action!
值的源代码写在 Red/System and part of the low-level runtime library code. They are not implemented in Red itself for sake of performance or because they require access to low-level features not available at Red level. Natives source code have a single entry point which you can find in the runtime/natives.reds file. For actions, it is more complex as they delegate 它们对每种数据类型的实现中。操作基本上是数据类型 类.