若K=0时Z=A,K=1时Z=B,下列哪个语法描述有误
A: process begin if K='0' then Z<=A; else Z<=B; end if; end process;
B: With K select Z<=A when '0', B when '1', 'X' when others;
C: Z<=A when K='0' else B when K='1';
D: Z<= (not K and A) or (K and B);
A: process begin if K='0' then Z<=A; else Z<=B; end if; end process;
B: With K select Z<=A when '0', B when '1', 'X' when others;
C: Z<=A when K='0' else B when K='1';
D: Z<= (not K and A) or (K and B);
举一反三
- 若K=0时Z=A,K=1时Z=B,下列哪个语法描述有误 A: process begin if K='0' then Z<=A; else Z<=B; end if; end process; B: With K select Z<=A when '0', B when '1', 'X' when others; C: Z<=A when K='0' else B when K='1'; D: Z<= (not K and A) or (K and B);
- 有语句:k=x<y(y<z1:0):0;,以下选项中,与此语句功能相同的是( )。 A: if(x<y || y<z)k=1;else k=0; B: if(x<y)k=0;else if(y<z)k=1; C: if(x<y)if(y<z)k=1;else k=0; D: if(x<y&&y<z)k=1;else k=0;
- 运行如下程序段: x=1 y=1 z=1 For j=1 To 3 For k=1 To 3 If j=1 Then x=x+y+z Else If j=2 Then x=2*x+2*y+2*z Else x=3*x+3*y+3*z End If Next k Next j x的值应是______。
- 若已定义int k; 赋值语句 k=(k%2==0?1:0); 与( )语句不等价。 A: if (k%2==0) k=1; else k=0; B: if (k%2!=0) k=0; else k=1; C: if (k%2) k=0; else k=1; D: if (k%2) k=1; else k=0;
- 函数f(x)=tan(2x-)的单调递增区间是() A: [,](k∈Z) B: (,)(k∈Z) C: [,](k∈Z) D: (,)(k∈Z)