Bug 25392 - Non-literals in integer widths
Summary: Non-literals in integer widths
Status: RESOLVED MOVED
Alias: None
Product: poke
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-15 18:00 UTC by John Darrington
Modified: 2022-07-11 18:41 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Darrington 2020-01-15 18:00:58 UTC
Some formats (notably dvi) have records containing an integral field, where the width of that field is determined by the record identifier.

It would be most convenient to be able represent this for example as:

deftype seti = struct
{
  int<8>                  opcode: opcode >= 128 && opcode < 131;
  int<(opcode - 128) * 8> character;
};

Other ways to represent this are possible, but they all require either a lot
more struct definitions or a lot of unions and conditionals.
Comment 1 Jose E. Marchesi 2020-11-14 14:59:52 UTC
Hi John.
I'm closing this enhancement request, as we are maintaining them in the POKE recfile that you can find in the source distribution, not here.

But don't worry, this issue is listed there :)