• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can a HNA be used anywhere you'd use a regular array?

Guest
Nov 06, 2014 Nov 06, 2014

Copy link to clipboard

Copied

I'm going to use some very large numeric arrays for lookup tables and such. Can I substitute such an array with an ASCII85 encoded homogeneous number array? The arrays will only be used with the get operator, and will contain either 16 bit or 32 bit integers, or floating point numbers.

TOPICS
Programming

Views

477

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 14, 2014 Nov 14, 2014

Copy link to clipboard

Copied

The PLRM states that HNAs are indistinguishable from literal arrays after the interpreter's scanner digested them. So I think the answer is yes. But you should try it out

with a small test proram.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 02, 2015 Jan 02, 2015

Copy link to clipboard

Copied

LATEST

This question is probably past it's use-by date by now, but: keep in mind that an HNA is just an alternative way of *encoding* an array in the PostScript stream. The PostScript scanner converts an HNA to a regular PostScript array internally; there's no savings in VM usage. (Just in case you were thinking this would be a more efficient way o storing an array.)

If you're looking to reduce VM use, you might be able to store your arrays as packedarrays; these take up about 70% as much VM as a regular array (and you can still express them in the PostScript stream as HNAs).

- John

----

John Deubert                                        Acumen Training

john@acumentraining.com      PostScript & PDF training & consulting

+1-949-248-1241                       http://www.acumentraining.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines