Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of ⎕NINFO callbacks #118

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

pmikkelsen
Copy link
Contributor

No description provided.

@pmikkelsen pmikkelsen linked an issue Feb 11, 2025 that may be closed by this pull request
@pmikkelsen pmikkelsen marked this pull request as ready for review February 14, 2025 13:29

## Overview

A **native file** is a data file without any specific structure, containing a sequence of bytes. A set of system functions is supplied to work with native files.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is too short! I don't think we should simply describe it as "a sequence of bytes" (it's probably "a sequence of byte values" at the least) but this doesn't seem to sit too comfortably with e.g. NAPPEND which can write multi-byte elements, and NGET which can decode e.g. UTF-8 et al. Maybe we should instead say that Dyalog provides a set of functions which can be used to process the "raw data" within a file, and perhaps contrast that with component files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but I don't think I am the right person to write this section.

Some of the native file functions, `⎕NCOPY`, `⎕NMOVE`, and `⎕NINFO`, support a variant option to enable progress callbacks.

### Overview
If this option is enabled, the system function invokes an APL callback function as the file operation proceeds. A system object is used to communicate between the system function and the callback. The file operation has 4 distinct stages:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea what a "system object" is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know where that terminology comes from, but in this case it is just a namespace, which is a bit different because the values assigned to its members are parsed/checked on assignment I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

00346 ⎕NINFO with callbacks
2 participants