- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
因为我是 VHDL 的初学者,所以互联网上的所有答案都不适合我。
我正在使用按钮和 LED 在 vhdl 中制作密码界面。我的程序按预期正确模拟。
基本上,我希望 LED 在输入错误密码时闪烁,但在输入正确密码时持续发光。您可以看到,这在模拟中有效。
SIMULATION IMAGE(模拟时先输入错误密码再输入正确密码)
在合成时,出现以下主要警告:
Optimizing unit <safehouse> ...
WARNING:Xst:1293 - FF/Latch <entry_pass.ncount_6> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_7> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
.
.
.
VHDL 代码是:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity safehouse is
Port ( keyled : out STD_LOGIC_VECTOR(0 TO 4);
keypad : in STD_LOGIC_VECTOR(0 to 7);
clk : in STD_LOGIC );
end safehouse;
architecture safehouse of safehouse is
signal temp : std_logic_vector(0 to 7) := "00000000";
begin
entry_pass: process(clk,keypad,temp)
type integer_vector is array (0 to 3) of integer;
variable i : integer := 0;
constant passoriginal : integer_vector := (2,5,2,6);
variable passcode : integer_vector := (0,0,0,0);
variable dcount : integer := 0;
variable ncount : integer := 0;
begin
if (rising_edge(clk)) then
keyled(4) <= '1';
if i < 4 then
keyled(0) <= '1';
if (temp /= keypad) then
case keypad is
when "10001000" =>
passcode(i) := 1;
keyled(i+1) <= '1';
i := i + 1;
when "10000100" =>
passcode(i) := 2;
keyled(i+1) <= '1';
i := i + 1;
when "10000010" =>
passcode(i) := 3;
keyled(i+1) <= '1';
i := i + 1;
when "10000001" =>
passcode(i) := 10;
keyled(i+1) <= '1';
i := i + 1;
when "01001000" =>
passcode(i) := 4;
keyled(i+1) <= '1';
i := i + 1;
when "01000100" =>
passcode(i) := 5;
keyled(i+1) <= '1';
i := i + 1;
when "01000010" =>
passcode(i) := 6;
keyled(i+1) <= '1';
i := i + 1;
when "01000001" =>
passcode(i) := 11;
keyled(i+1) <= '1';
i := i + 1;
when "00101000" =>
passcode(i) := 7;
keyled(i+1) <= '1';
i := i + 1;
when "00100100" =>
passcode(i) := 8;
keyled(i+1) <= '1';
i := i + 1;
when "00100010" =>
passcode(i) := 9;
keyled(i+1) <= '1';
i := i + 1;
when "00100001" =>
passcode(i) := 12;
keyled(i+1) <= '1';
i := i + 1;
when "00011000" =>
passcode(i) := 14;
keyled(i+1) <= '1';
i := i + 1;
when "00010100" =>
passcode(i) := 0;
keyled(i+1) <= '1';
i := i + 1;
when "00010010" =>
passcode(i) := 15;
keyled(i+1) <= '1';
i := i + 1;
when "00010001" =>
passcode(i) := 13;
keyled(i+1) <= '1';
i := i + 1;
when others =>
keyled(4) <= '1';
end case;
temp <= keypad;
end if;
else
if passcode = passoriginal then
dcount := dcount + 1;
if dcount >= 50000000 then
keyled <= ('1','1','1','1','1');
dcount := 1;
ncount := ncount + 1;
if ncount >= 8 then
i := 0;
passcode := (0,0,0,0);
keyled <= ('0','0','0','0','1');
ncount := 1;
end if;
end if;
else
dcount := dcount + 1;
if dcount >= 50000000 then
if (ncount rem 2) = 0 then
keyled <= ('1','1','1','1','1');
else
keyled <= ('0','0','0','0','1');
end if;
dcount := 1;
ncount := ncount + 1;
if ncount >= 8 then
i := 0;
keyled <= ('1','0','0','0','1');
ncount := 1;
end if;
end if;
end if;
end if;
end if;
end process;
end safehouse;
我知道变量 ncount 正在被修剪,但我需要它。变量 ncount 用于创建 4 秒的延迟,使用变量 dcount 用于创建 0.5 秒的延迟。如果没有变量 ncount,我无法创建 4 秒的延迟。
完整的警告是:
WARNING:Xst:1710 - FF/Latch <keyled_4> (without init value) has a constant value of 1 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
Optimizing unit <safehouse> ...
WARNING:Xst:1293 - FF/Latch <entry_pass.ncount_6> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_7> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_8> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_11> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_9> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_10> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_14> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_12> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_13> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_17> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_15> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_16> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_20> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_18> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_19> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_23> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_21> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_22> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_26> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_24> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_25> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_29> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_27> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_28> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_30> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_31> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_26> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_29> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_27> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_28> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_30> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_31> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_3> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_4> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_5> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_6> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_7> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_8> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_9> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_10> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_11> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_12> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_13> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_14> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_15> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_16> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_17> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_18> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_19> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_20> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_21> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_22> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_23> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_24> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_25> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_26> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_27> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_28> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_29> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_30> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_31> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_4> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_3> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_5> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
我使用的FPGA开发板是:Xilinx Spartan 6 XC6SLX9 TQG144。请帮助我。
最佳答案
我自己解决了这个问题。谢谢大家。
用信号替换变量并添加约束(它们的值范围)
给变量添加约束可能会解决问题。
在将变量(如 i、dcount、ncount)更改为信号后,我的程序能够在没有任何警告的情况下进行综合,这一事实让我认为问题出在 If 语句的 Scope 。由于对变量的赋值操作是在嵌套的 if 语句中进行的,因此合成器没有在所需范围内发现变量值的变化,并假定它具有常量值。信号的范围比变量好得多。
但是,由于我是初学者,所以我上面所说的原因可能是错误的。但这是解决我的问题的代码。
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity safehouse is
Port ( keyled : out STD_LOGIC_VECTOR(0 TO 4);
keypad : in STD_LOGIC_VECTOR(0 to 7);
clk : in STD_LOGIC );
end safehouse;
architecture safehouse of safehouse is
signal temp : std_logic_vector(0 to 7) := "00000000";
signal dcount : integer range 0 to 100000000 := 0;
signal ncount : integer range 0 to 10 := 0;
signal i : integer range 0 to 5;
begin
entry_pass: process(clk,keypad,temp,dcount,ncount,i)
type integer_vector is array (0 to 3) of integer;
constant passoriginal : integer_vector := (2,5,2,6);
variable passcode : integer_vector := (0,0,0,0);
begin
if (rising_edge(clk)) then
keyled(4) <= '1';
if i < 4 then
keyled(0) <= '1';
if (temp /= keypad) then
case keypad is
when "10001000" =>
passcode(i) := 1;
keyled(i+1) <= '1';
i <= i + 1;
when "10000100" =>
passcode(i) := 2;
keyled(i+1) <= '1';
i <= i + 1;
when "10000010" =>
passcode(i) := 3;
keyled(i+1) <= '1';
i <= i + 1;
when "10000001" =>
passcode(i) := 10;
keyled(i+1) <= '1';
i <= i + 1;
when "01001000" =>
passcode(i) := 4;
keyled(i+1) <= '1';
i <= i + 1;
when "01000100" =>
passcode(i) := 5;
keyled(i+1) <= '1';
i <= i + 1;
when "01000010" =>
passcode(i) := 6;
keyled(i+1) <= '1';
i <= i + 1;
when "01000001" =>
passcode(i) := 11;
keyled(i+1) <= '1';
i <= i + 1;
when "00101000" =>
passcode(i) := 7;
keyled(i+1) <= '1';
i <= i + 1;
when "00100100" =>
passcode(i) := 8;
keyled(i+1) <= '1';
i <= i + 1;
when "00100010" =>
passcode(i) := 9;
keyled(i+1) <= '1';
i <= i + 1;
when "00100001" =>
passcode(i) := 12;
keyled(i+1) <= '1';
i <= i + 1;
when "00011000" =>
passcode(i) := 14;
keyled(i+1) <= '1';
i <= i + 1;
when "00010100" =>
passcode(i) := 0;
keyled(i+1) <= '1';
i <= i + 1;
when "00010010" =>
passcode(i) := 15;
keyled(i+1) <= '1';
i <= i + 1;
when "00010001" =>
passcode(i) := 13;
keyled(i+1) <= '1';
i <= i + 1;
when others =>
keyled(4) <= '1';
end case;
temp <= keypad;
end if;
else
if passcode = passoriginal then
dcount <= dcount + 1;
if dcount >= 50000000 then
keyled <= ('1','1','1','1','1');
dcount <= 1;
ncount <= ncount + 1;
if ncount >= 8 then
i <= 0;
passcode := (0,0,0,0);
keyled <= ('0','0','0','0','1');
ncount <= 1;
end if;
end if;
else
dcount <= dcount + 1;
if dcount >= 50000000 then
if (ncount rem 2) = 0 then
keyled <= ('1','1','1','1','1');
else
keyled <= ('0','0','0','0','1');
end if;
dcount <= 1;
ncount <= ncount + 1;
if ncount >= 8 then
i <= 0;
keyled <= ('1','0','0','0','1');
ncount <= 1;
end if;
end if;
end if;
end if;
end if;
end process;
end safehouse;
这是我在这个网站上的第一个问题。我会赞成每一个回应。我有一个很好的经历。谢谢。
关于warnings - VHDL 警告 Xst :1293 FF/Latch has a constant value of 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45639064/
所以如果我在 C++ 中有这样的东西: char A_char = 'A'; char * myPtr = &A_char; const char * myPtr = &char_A; //point
我试图在我的 Perl 脚本中将魔数(Magic Number)声明为常量,如 perlsub 中所述。但是,我收到警告: $ cat foo.perl use warnings ; use stri
我想为 data Constant a b = Constant a 这是我的直接尝试: instance Foldable (Constant a) where foldr f b (Const
我在客户端和服务器端拆分了我的文件夹,但我没有从父文件夹工作,我表现得好像它们是 2 个不同的文件夹...现在我想部署到 Heroku 但我为此需要一个主文件夹,所以我想更改我的 webpack.co
当函数不修改对象参数时,我总是让它请求一个常量引用,即使引用的对象不是真正的常量。这是错误的吗? 对于包装类,我想这样写: template class Wrapper{ private: B*
核心常量表达式的定义取决于常量表达式的概念,如要点 (2.7.1) 和 (2.9.1) 所示N4140 的。 §5.19/2: A conditional-expression e is a core
我有以下代码片段,它按预期工作。其中 x 是一个变量 var myVariable = (x === 'A' || x=== 'B') ? 'sui' : 'pai'; 但是闭包编译器正在将它转换为
我是一个国际化应用程序。其中一部分在于菜单的国际化。没关系。 通过 GWT,我可以使用 Constants 接口(interface)。 现在我必须国际化该应用程序的帮助,其中包括一些涉及菜单的文本。
在 Bjarne Stroustrup 的 A Tour of C++ 中,每章末尾都列出了一些建议。在第一章的结尾,其中一个写道: Avoid ‘‘magic constants;’’ use sy
创建常量数组的常量数组的语法是什么? 我希望函数参数是常量 char* 字符串的常量数组。 最佳答案 您可以通过将 const 放在第一个星号的右侧来实现,例如 void f(const char *
我有一本带图书馆的 Chef Recipe ,例如库.rb。它包含一个 CONSTANT: CONSTANT = 'constant' 当我为这本 Recipe 编写单元测试时,它总是给我警告: (S
这个问题在这里已经有了答案: 关闭 11 年前。 Possible Duplicate: How to check for equals? (0 == i) or (i == 0) Why does
我有以下代码: constexpr unsigned long long power_function(const unsigned long long prime, const unsigned l
在一个页面上,我有几个 Angular 模块。我为每个模块定义了一个包含模块版本的常量。 var module1 = angular.module('module1').constant('versi
C++14 中的§5.19/3 定义了一个整型常量表达式和一个转换后的常量表达式: An integral constant expression is an expression of integr
如果您打开 R# 选项并转到代码编辑> C# > 命名样式,则有 2 个设置与我非常相似。本地常量和常量字段(私有(private))。一种是 lowerCaseCamel,另一种是 UpperCam
如何将恰好命名为 reverse 的以下方法重写为允许任何枚举类型的泛型方法。 public class TestX { enum Gender { male, female } pu
我和我的一位队友进行了一次有趣的谈话。 CONSTANT.equals(VARIABLE) 是否比 Java 中的 VARIABLE.equals(CONSTANT) 快? 我怀疑这是一个虚假陈述。但
我想在 c 程序中执行脚本 cmd,所以函数 SYSTEM(CONST CHAR) 可以执行它,但我想使用这个函数和 3 个不同的参数写入一次。谁能帮帮我,有没有那种功能。 最佳答案 如果我猜对了,您
VStudio 或 ReSharper 给我以下建议: constant 在这种情况下意味着什么?如果它是当前方法作用域中的一个常量,目的是什么?方法往往很小,因此与常规 var 相比,它不应该有任何
我是一名优秀的程序员,十分优秀!