我继承了这段代码,无法弄清楚它的作用。定义看起来很简单:
result : BOOLEAN ;
LOOKUP_TABLE : array
( BOOLEAN, BOOLEAN, BOOLEAN, BOOLEAN, BOOLEAN, BOOLEAN, BOOLEAN, BOOLEAN,
BOOLEAN, BOOLEAN, BOOLEAN, BOOLEAN, BOOLEAN, BOOLEAN, BOOLEAN, BOOLEAN ) of
BOOLEAN := (others => (others => (others => (others => (others => (others => (others => (others =>
(others => (others => (others => (others => (others => (others => (others => (others =>
TRUE ))))))))))))))));
在正文中,它的用法如下:
result := LOOKUP_TABLE(TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE,
FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE );
在 GDB 中转储 lookup_table 时,它会创建一个超过 500,000 个字符长的行,第一个部分看起来像这样:
$1 = ((((((((((((((((true, true), (true, true)), ((true, true), (true, true))), (((true, true), (true, ...
最初我的问题是:如何将 16 个布尔数组简化为单个布尔“结果”?但在 GDB 中查看后,我不得不问“这是什么东西???”
PS:在body中调用之后,LOOKUP_TABLE还是500,000个字符,其中每个布尔字段都是TRUE...