I don't like to write switch keyword and then list cases under switch.
Example:
int a = 0;
switch(a)
{
case 1:
......
break;
case 2:
.......
break;
case 3
.......
break;
}
After compiling and linking source code, assembler will show cmp
eax,dword ptr [a], je 1, je 2, and je 3 like this way. Scan each JE
instruction can reduce the performance each loop. It would be best to use
JMP [EAX*4]. JMP Table points to EAX plus 0, 1, or 2. It will gain great
performance.
I can write JMP Table using MASM. I don't know if HLA support JMP Table
that allows me to convert switch / case into JMP Table. Visual C++ has
limitation for inline __asm function, but it can't support JMP Table. There
has to be another way. Array functions will be great like below.
Example:
for (a = 0; a <= 2; a++)
Array_Function[a];
I don't want to use function because it has to push EIP into stack
before it begins to call. After RET is executed, EIP will be popped out of
stack. It is annoying. JMP Label is useful. Is there a way that I can
create inline Array_Function without needing to use call and ret
instruction. I can't use JMP $xxxx to point one of these Array_Function.
The way is to put inline Array_Function by adding JMP $xxxx. I must
count all the bytes each inline Array_Function before I have to put pointer
address into each DD (JMP $xxxx)'s address. It is not good practice, but I
am forced to use MASM or MASM32. MASM or MASM32 always automatically point
to pointer address into DATA list during assembling and linking, but there
is no option for inline __asm under Visual C++.
Do you have suggestion if there is another way to convert Switch / Case
into JMP Table inside inline __asm? If it is not the way how it works, I
must live with MASM or MASM32. The reason is that I don't like to compile
ASM files and CPP files together in Visual C++. Please advise.
--
Bryan Parkoff
|
|
0
|
|
|
|
Reply
|
Bryan
|
10/30/2003 7:07:57 AM |
|
"Bryan Parkoff" <nospam@nospam.com> wrote in message
news:hN2ob.6545$D87.2698@twister.austin.rr.com...
> I don't like to write switch keyword and then list cases under switch.
>
> Example:
>
> int a = 0;
> switch(a)
> {
> case 1:
> ......
> break;
>
> case 2:
> .......
> break;
>
> case 3
> .......
> break;
> }
>
> After compiling and linking source code, assembler will show cmp
> eax,dword ptr [a], je 1, je 2, and je 3 like this way. Scan each JE
> instruction can reduce the performance each loop. It would be best to use
> JMP [EAX*4]. JMP Table points to EAX plus 0, 1, or 2. It will gain great
> performance.
Which compiler are you using? VC does this. I've even seen it compress the
jumptable like this:
; 199 : switch(a)
movzx eax, BYTE PTR ?a@@3DA ; a
cmp eax, 12 ; 0000000cH
ja SHORT $L57316
movzx eax, BYTE PTR $L57840[eax]
jmp DWORD PTR $L57841[eax*4]
$L57314:
; 200 : {
; 201 : case 0:
; 202 : case 3:
; 203 : case 7:
; 204 : case 12:
; 205 : i++;
add DWORD PTR ?i@@3HA, 1 ; i
; 211 : }
; 212 : }
ret 0
$L57316:
; 206 : case 1:
; 207 : case 2:
; 208 : break;
; 209 : default:
; 210 : __asm int 3h
int 3
$L57311:
; 211 : }
; 212 : }
ret 0
$L57841:
DD $L57314
DD $L57311
DD $L57316
$L57840:
DB 0
DB 1
DB 1
DB 0
DB 2
DB 2
DB 2
DB 0
DB 2
DB 2
DB 2
DB 2
DB 0
It has to store 12 cases, so rather than store 12 labels (12*4=36 bytes), it
stores 3 labels and creates a translation table (3*4 = 12, 12*1=12, 12+12=24
bytes).
<snip>
> I don't want to use function because it has to push EIP into stack
> before it begins to call. After RET is executed, EIP will be popped out
of
> stack. It is annoying. JMP Label is useful. Is there a way that I can
> create inline Array_Function without needing to use call and ret
> instruction. I can't use JMP $xxxx to point one of these Array_Function.
There is no way that I know of in VC inline assembler. You can't create an
array of labels, so you have nowhere to store the table.
<snip>
> Do you have suggestion if there is another way to convert Switch /
Case
> into JMP Table inside inline __asm? If it is not the way how it works, I
> must live with MASM or MASM32. The reason is that I don't like to compile
> ASM files and CPP files together in Visual C++. Please advise.
As above, just use switch/case statements. They are very well optimized.
-Matt
|
|
0
|
|
|
|
Reply
|
Matt
|
10/30/2003 11:55:06 AM
|
|
"Bryan Parkoff" <nospam@nospam.com> wrote:
>
> I don't like to write switch keyword and then list cases under switch.
That's silly. As Matt pointed out, Visual C++ definitely will optimize
switch statements to jump tables, or better.
>Example:
>
> for (a = 0; a <= 2; a++)
> Array_Function[a];
>
> I don't want to use function because it has to push EIP into stack
>before it begins to call. After RET is executed, EIP will be popped out of
>stack. It is annoying.
This is also silly. Bryan, you are wasting WAY too much time on
micro-optimization. Let's say that each of these functions takes 10,000
cycles. That function call and return is going to add less that one tenth
of one percent to the total execution time. It is bonkers for you to worry
about getting rid of it.
FIRST figure out what is taking the most time. THEN optimize that. If you
focus in on the wrong things, you'll just waste your own time without
making your program run any faster.
>The reason is that I don't like to compile
>ASM files and CPP files together in Visual C++.
This is ALSO silly. Why don't you "like" to compile ASM and CPP files
together? It is a great way to introduce big setions of assembler into a
C++ program.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
|
|
0
|
|
|
|
Reply
|
Tim
|
10/31/2003 4:27:04 AM
|
|
"Bryan Parkoff" <nospam@nospam.com> wrote in message news:hN2ob.6545$D87.2698@twister.austin.rr.com...
> I don't like to write switch keyword and then list cases under switch.
>
>
> After compiling and linking source code, assembler will show cmp
> eax,dword ptr [a], je 1, je 2, and je 3 like this way.
When most compilers emit code this way, it's because they've calculated
things out and figured that the cmp/jcc method is faster (or shorter) than
the jump table method. Add more cases and you'll probably see it switch
to a jump table (unless, of course, you've got a really bad compiler -- then
it's time to change compilers).
> Scan each JE
> instruction can reduce the performance each loop. It would be best to use
> JMP [EAX*4]. JMP Table points to EAX plus 0, 1, or 2. It will gain great
> performance.
> I can write JMP Table using MASM. I don't know if HLA support JMP Table
> that allows me to convert switch / case into JMP Table. Visual C++ has
> limitation for inline __asm function, but it can't support JMP Table. There
> has to be another way. Array functions will be great like below.
Sure.
In fact, HLA has a macro in the standard library that lets you use a
SWITCH/CASE statement. But if you really don't like putting your cases
after a switch statement, you can write the same code manually, e.g.,
readonly
jmptable: dword [] := [&lbl1, &lbl2, &lbl3, ..., &lbln];
.
.
.
mov( i, eax );
jmp( jmptable [eax*4] );
.
.
.
lbl1: ...
.
.
.
lbl2: ...
.
.
.
etc.
> Example:
>
> for (a = 0; a <= 2; a++)
> Array_Function[a];
>
> I don't want to use function because it has to push EIP into stack
> before it begins to call. After RET is executed, EIP will be popped out of
> stack. It is annoying. JMP Label is useful.
So how about:
for( mov( 0, eax); eax <= 2; inc( eax )) do
jmp( jmpTable[ eax*4] );
rtnLabel:
endfor;
Of course, each label you jump to has to jump back to rtnLabel in order
for this to make sense.
> Is there a way that I can
> create inline Array_Function without needing to use call and ret
> instruction. I can't use JMP $xxxx to point one of these Array_Function.
> The way is to put inline Array_Function by adding JMP $xxxx. I must
> count all the bytes each inline Array_Function before I have to put pointer
> address into each DD (JMP $xxxx)'s address. It is not good practice, but I
> am forced to use MASM or MASM32. MASM or MASM32 always automatically point
> to pointer address into DATA list during assembling and linking, but there
> is no option for inline __asm under Visual C++.
> Do you have suggestion if there is another way to convert Switch / Case
> into JMP Table inside inline __asm? If it is not the way how it works, I
> must live with MASM or MASM32. The reason is that I don't like to compile
> ASM files and CPP files together in Visual C++. Please advise.
Perhaps it would be better to explain what you're trying to do at a higher
level. The description you're providing is insufficient to offer you good advice
on how to handle your problem.
Cheers,
Randy Hyde
|
|
0
|
|
|
|
Reply
|
Randall
|
10/31/2003 6:32:47 AM
|
|
> > I don't like to write switch keyword and then list cases under
switch.
>
> That's silly. As Matt pointed out, Visual C++ definitely will optimize
> switch statements to jump tables, or better.
Please do not claim to say that it is silly. Wasting time is always
good deal for researches and studies.
>
> >Example:
> >
> > for (a = 0; a <= 2; a++)
> > Array_Function[a];
> >
> > I don't want to use function because it has to push EIP into stack
> >before it begins to call. After RET is executed, EIP will be popped out
of
> >stack. It is annoying.
The problem is that it has to execute Array_Function[a] more than
100,000 times per second that can hurt the performance because it can slow
the CPU by pushing into and popping out of stack using CALL and RET keyword.
>
> This is also silly. Bryan, you are wasting WAY too much time on
> micro-optimization. Let's say that each of these functions takes 10,000
> cycles. That function call and return is going to add less that one tenth
> of one percent to the total execution time. It is bonkers for you to
worry
> about getting rid of it.
The cycle counter is very important to measure the time. Do you want to
wait the CPU to process genetics in the database for 450 years. It is WOW
that 450 years is a very long journey that we must wait for the CPU to
finish. It is what the researchers measure the cycle counter and time.
There are many ways to solve the problems so CPU can be done at short time
rather than 450 years. It has nothing to do with optimization, but it can
hurt the performance that we must wait. It is very interesting topic for
the genetic researchers. It is the truth that they claim to happen.
I always brainstorm my ideas into draft projects before I can start
writing x86 codes. I have no reason to write x86 codes without my thoughts
and ideas in my mind.
>
> FIRST figure out what is taking the most time. THEN optimize that. If
you
> focus in on the wrong things, you'll just waste your own time without
> making your program run any faster.
Please read this genetic topic above.
>
> >The reason is that I don't like to compile
> >ASM files and CPP files together in Visual C++.
>
> This is ALSO silly. Why don't you "like" to compile ASM and CPP files
> together? It is a great way to introduce big setions of assembler into a
> C++ program.
Randall Hyde is a very good assembler programmer. He can figure out why
Array_Function[a] is bad idea so Jump Table is the best solution. Lets say,
__1:
x86 codes
jmp [eax*4]
__2:
x86 codes
jmp [eax*4]
__3:
x86 codes
jmp [eax*4]
Do you see that jmp [eax*4] is best than using while loop? There is no
BREAK between __1, __2, and __3 like switch case do. It is not necessary to
scan each JE instruction before it can jump __1, __2, or __3. After jump
__1, __2, or __3 are done, it reaches jmp [eax*4] to do over again.
Sometimes, some software may need while loop that has to scan __1, __2,
or __3, but different type of software design choose not to use SCAN each JE
so they choose to use JMP Table. Does it make sense?
I hope that it helps.
Bryan Parkoff
|
|
0
|
|
|
|
Reply
|
Bryan
|
10/31/2003 3:17:54 PM
|
|
"Bryan Parkoff" <nospam@nospam.com> wrote in message
news:C2vob.8034$D87.6897@twister.austin.rr.com...
<snip>
> Sometimes, some software may need while loop that has to scan __1,
__2,
> or __3, but different type of software design choose not to use SCAN each
JE
> so they choose to use JMP Table. Does it make sense?
And in this case, it is recommended that you rearrange your code like this:
while(x)
{
switch(y)
{
case a:
// something
break;
case b:
// something
break;
}
}
becomes:
switch(y)
{
case a:
while(x)
{
// something
}
break;
case b:
while(x)
{
// something
}
}
It is more code, but the conditional does not need to be re-executed every
time.
-Matt
|
|
0
|
|
|
|
Reply
|
Matt
|
10/31/2003 8:08:36 PM
|
|
"Bryan Parkoff" <nospam@nospam.com> wrote:
>>
>> >Example:
>> >
>> > for (a = 0; a <= 2; a++)
>> > Array_Function[a];
>> >
>> > I don't want to use function because it has to push EIP into stack
>> >before it begins to call. After RET is executed, EIP will be popped out
>> >of stack. It is annoying.
> The problem is that it has to execute Array_Function[a] more than
>100,000 times per second that can hurt the performance because it can slow
>the CPU by pushing into and popping out of stack using CALL and RET keyword.
Using CALL and RET 100,000 times in a second costs roughly 800,000 cycles.
On a 3GHz Pentium, that's about 266 microseconds per second. Can you
possibly concieve of how insignificant that is?
> The cycle counter is very important to measure the time. Do you want to
>wait the CPU to process genetics in the database for 450 years.
And if you remove the CALL and RET, it will be 449 years, 10 months, and 17
days.
My POINT here is that, by doing things in a more difficult and convoluted
way, you make the code more difficult to understand and much more prone to
complicated errors. How much time will you have saved if your
microoptimization introduces a subtle bug that triggers in year 250, and
you (or your great grandchildren) have to start over?
> Randall Hyde is a very good assembler programmer. He can figure out why
>Array_Function[a] is bad idea so Jump Table is the best solution.
No. He offered a possible alternative. He did NOT say the array of
functions approach was a "bad idea", nor did he suggest that the jump table
was "the best solution". He knows better than that. A programmer needs to
have ALL of these tools in his toolbox, and he needs to use the one that is
most appropriate for the job.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
|
|
0
|
|
|
|
Reply
|
Tim
|
11/1/2003 10:08:02 PM
|
|
Tim,
> > The cycle counter is very important to measure the time. Do you want
to
> >wait the CPU to process genetics in the database for 450 years.
>
> And if you remove the CALL and RET, it will be 449 years, 10 months, and
17
> days.
>
> My POINT here is that, by doing things in a more difficult and convoluted
> way, you make the code more difficult to understand and much more prone to
> complicated errors. How much time will you have saved if your
> microoptimization introduces a subtle bug that triggers in year 250, and
> you (or your great grandchildren) have to start over?
Okay, you claim to be true. Use CALL and RET can reduce the size that
will run faster, but switch / case uses JMP Table that does not use CALL and
RET can cause the size to be bigger and bigger. Why? Because it has
duplicated routines without using CALL and RET. It is like MACRO that MACRO
is posted each case under switch so duplicated routines are still there. My
point is that JMP Table and JMP without Table (like GOTO) are not good
practice.
***Switch / Case will be good practice IF functions (CALL / RET) are
included each cases under switch. ***
If I allow to run Array_Function[a] (do have CALL and RET included) on
the first PC while I allow to run switch / case (using JMP Table without
CALL and RET) on the second PC, both PCs will run at the same time. If
first PC finishes running before second PC finishes running, I say that
first PC wins like time race.
I agree with Tim and Matt that it is wasting time to write in assembler
programming that uses either JMP Table or CALL and RET. It can be prone
errors. Then C/C++ Compiler is the best choice that will save a lot of
wasting time by trying to find prone errors in assembler programming.
Do you think that we use functions (CALL and RET) in C/C++ compiler will
be much faster and less prone errors? Why do Microsoft says that switch /
case is not good practice because it can be prone errors so they claim to
use functions (CALL and RET) inside loop like I quote "Array_Function[a]".
Do you (Matt and Tim) agree?
Why do Darek (at www.emulators.com) claim that C/C++ IS THE WRONG
LANGUAGE for emulator projects? He tells to write in assembler programming
by using JMP Table that will help emulator to run much faster. He was
disappointed at Intel because his emulation project runs much slower on
Pentium 4. He had to spend his time start over his work by changing the
assembler codes to work with Pentium 4 like optimization. My point is that
he is wasting his time by modifying assembler codes.
We should live with C/C++ compiler by writing emulator. The source code
must be preserved so we can be able to use optimization switch under C/C++
compiler (such as /G3, /G4, /G5, /G6, and /G7). We do not need to worry by
modifying C/C++ source code. It will remain unchanged, but generate into
assembler codes will be changed by C/C++ compiler.
Do you (Matt and Tim) agree?
If C/C++ compiler does not support to use Setcc after optimization (I
assume Setcc will be shown if it is global variable, otherwise PUSH will be
shown if it is local variable.), I will use inline __asm to put Setcc there.
I do realize that inside __asm can't be optimized, but outside of __asm can
be optimized easily. I guess that I can only need to use __asm by putting
less than 5 instructions that is enough.)
What do you think? I like Visual C++ 7.1 much better than Visual C++
6.0 because Visual C++ 7.1 has additional features that allows me to
show/hide each functions for easier reading.
Please tell me what your opinion point to use Visual C++ with small
amount of __asm including CALL / RET, but avoid to use oldest assembler
programming such as MASM.
I get challenge with you by discussing in the newsgroups that it helps
each of us to realize how easier to write and save more time -- less prone
errors.
Bryan Parkoff
|
|
0
|
|
|
|
Reply
|
Bryan
|
11/2/2003 5:11:25 AM
|
|
"Bryan Parkoff" <nospam@nospam.com> wrote in message
news:1m0pb.11894$D87.5089@twister.austin.rr.com...
<snip>
> Do you think that we use functions (CALL and RET) in C/C++ compiler
will
> be much faster and less prone errors? Why do Microsoft says that switch /
> case is not good practice because it can be prone errors so they claim to
> use functions (CALL and RET) inside loop like I quote "Array_Function[a]".
> Do you (Matt and Tim) agree?
Where does Microsoft say that?
> Why do Darek (at www.emulators.com) claim that C/C++ IS THE WRONG
> LANGUAGE for emulator projects? He tells to write in assembler
programming
> by using JMP Table that will help emulator to run much faster. He was
> disappointed at Intel because his emulation project runs much slower on
> Pentium 4. He had to spend his time start over his work by changing the
> assembler codes to work with Pentium 4 like optimization. My point is
that
> he is wasting his time by modifying assembler codes.
I have not read what he has to say, so I don't know. I looked at his
website, but I could not find anywhere where he says what you claim he says.
One of the advantages of a high level language is that you only express the
function of the code. The implementation is left to the compiler, so you can
produce good code for different CPUs without a lot of work. The upcoming
AMD-64 architecture is a good example. 64-bit arithmetic is inefficient in
x86 assembly. If you write code that manipulates 64-bit integers in a
high-level language, you will get a good performance increase for free by
switching to a compiler that produces x86-64 code.
The limitation is that the compiler does not do as good of a job as an
assembly programmer. The compiler does not read or understand code. It is a
list of static, unchanging rules which determine how an intermediate
language (IL) gets converted into machine instructions. Usually this isn't a
big deal. You write your code in a high level language, determine which
parts of the compiled code are slow, and optimize it yourself in assembly.
> We should live with C/C++ compiler by writing emulator. The source
code
> must be preserved so we can be able to use optimization switch under C/C++
> compiler (such as /G3, /G4, /G5, /G6, and /G7). We do not need to worry
by
> modifying C/C++ source code. It will remain unchanged, but generate into
> assembler codes will be changed by C/C++ compiler.
> Do you (Matt and Tim) agree?
I don't understand what you're asking.
> If C/C++ compiler does not support to use Setcc after optimization (I
> assume Setcc will be shown if it is global variable, otherwise PUSH will
be
> shown if it is local variable.), I will use inline __asm to put Setcc
there.
> I do realize that inside __asm can't be optimized, but outside of __asm
can
> be optimized easily. I guess that I can only need to use __asm by putting
> less than 5 instructions that is enough.)
VC cannot optimize around __asm blocks, but GCC can.
Oh, by the way, get used to not using inline assembly. It will no longer be
supported in VC 8. You need VC 8 (Whidbey) if you want to compile for
AMD-64.
> What do you think? I like Visual C++ 7.1 much better than Visual C++
> 6.0 because Visual C++ 7.1 has additional features that allows me to
> show/hide each functions for easier reading.
I like the IDE/debugger better. The compiler produces slightly better code,
and 7.1 has Pentium 4 optimizations. Also, both VC 7 and 7.1 support the C++
standard much better than VC 6 does.
> Please tell me what your opinion point to use Visual C++ with small
> amount of __asm including CALL / RET, but avoid to use oldest assembler
> programming such as MASM.
<snip>
Why would you do this? You've posted about several optimizations, and in
every case VC will do it, and it will do a better job than is practical to
do by hand.
Usually I write inline assembly. When I don't use inline assembly, I use
nasm. I like nasm better than masm because nasm has a simpler syntax.
-Matt
|
|
0
|
|
|
|
Reply
|
Matt
|
11/2/2003 7:08:57 AM
|
|
"Bryan Parkoff" <nospam@nospam.com> wrote:
>
> Okay, you claim to be true. Use CALL and RET can reduce the size that
>will run faster, but switch / case uses JMP Table that does not use CALL and
>RET can cause the size to be bigger and bigger. Why? Because it has
>duplicated routines without using CALL and RET.
Possibly. So what? As we have tried to explain before, LARGER code does
not automatically imply SLOWER code.
>It is like MACRO that MACRO
>is posted each case under switch so duplicated routines are still there. My
>point is that JMP Table and JMP without Table (like GOTO) are not good
>practice.
My point is that you cannot make a blanket statement like that. There are
times when it matters. There are times when it flat out does not matter.
A good programmer recognizes the difference and doesn't worry about it when
it does not matter.
>***Switch / Case will be good practice IF functions (CALL / RET) are
>included each cases under switch. ***
This statement is just not true.
> Do you think that we use functions (CALL and RET) in C/C++ compiler will
>be much faster and less prone errors? Why do Microsoft says that switch /
>case is not good practice because it can be prone errors so they claim to
>use functions (CALL and RET) inside loop like I quote "Array_Function[a]".
> Do you (Matt and Tim) agree?
No, I do not agree. Further, Microsoft never said that.
> Why do Darek (at www.emulators.com) claim that C/C++ IS THE WRONG
>LANGUAGE for emulator projects? He tells to write in assembler programming
>by using JMP Table that will help emulator to run much faster.
Darek is entitled to his opinion. And, in fact, it will sometimes be true
that C/C++ is the wrong language for emulator projects. However, it will
often be false.
> If C/C++ compiler does not support to use Setcc after optimization (I
>assume Setcc will be shown if it is global variable, otherwise PUSH will be
>shown if it is local variable.), I will use inline __asm to put Setcc there.
>I do realize that inside __asm can't be optimized, but outside of __asm can
>be optimized easily. I guess that I can only need to use __asm by putting
>less than 5 instructions that is enough.)
> What do you think?
I think you are still "micro-optimizing". FIRST, get the application to
work. That will often involve a high-level language. THEN, decide if it
is fast enough or not. THEN, figure out where it spends most of its time.
And ONLY THEN, you think about how you could re-code those sections in
assembler.
> Please tell me what your opinion point to use Visual C++ with small
>amount of __asm including CALL / RET, but avoid to use oldest assembler
>programming such as MASM.
I often use inline __asm for short routines. I also often use MASM for
longer routines, because I like coding with macros. Both have their place
in a programmer's toolkit, and it is foolish to ignore one or the other.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
|
|
0
|
|
|
|
Reply
|
Tim
|
11/4/2003 6:02:45 AM
|
|
|
9 Replies
281 Views
(page loaded in 0.693 seconds)
Similiar Articles: Switch + Case - comp.lang.asm.x86I don't like to write switch keyword and then list cases under switch. Example: int a = 0; switch(a) { case 1: ..... break; ... switch/case with wildcards? - comp.soft-sys.matlabI know switch/case can use multiple case_expr values, e.g., {'this','that'} and that if any of them match, that case statement will execute. Is there... break in switch and while - comp.lang.c++.moderatedI believe I have discovered a bug in our compiler. It involves a break statement which is inside of the default case of a switch, but the switch has ... SWITCH expression must be a scalar or string constant - comp.soft ...Hi, everyone. I came across a strange question while I tried to use fzero. For example, if I type X = fzero(@tan,2), the Matlab window will show up t... Why was the hub faster than the switch? - comp.dcom.xdsl ...Switch + Case - comp.lang.asm.x86 Why was the hub faster than the switch? - comp.dcom.xdsl ... Switch + Case - comp.lang.asm.x86 Switch + Case - comp.lang.asm.x86 Why was ... Need help figuring out how to write the script for this problem ...Switch + Case - comp.lang.asm.x86 Need help figuring out how to write the script for this problem ... Use switch/case to determine the cost for the type lot entered. Gnu compiler switch() {} statement - comp.compilers.lccDoes anybody know how to force the GNU compiler not to use jump-tables for switch ... using #pragma density(0.0) will force a jump-table even for the very sparse case ... ??? Output argument "r" (and maybe others) not assigned during ...If c is something other than one of those six values, NONE of the cases in your SWITCH-CASE block will trigger and so you never assign a value to the variable r. Access control between VLANs on Cisco 3750 switch - comp.dcom.sys ...In a VLAN environment, you > apply the ACL to switch virtual interfaces (SVIs) or routed interfaces > (no switchport). > > Here's an example: > > Switch(config)# access ... How to use OSGi bundle services dynamically - comp.lang.java.help ...Switch + Case - comp.lang.asm.x86 How to use OSGi bundle services dynamically - comp.lang.java.help ..... on the other i always have to make sure that the service i want ... Switch statement - Wikipedia, the free encyclopediaIn computer programming, a switch, case, select or inspect statement is a type of selection control mechanism that exists in most imperative programming languages ... switch (C#) - Microsoft Corporation: Software, Smartphones, Online ...The switch statement is a control statement that handles multiple selections by passing control to one of the case statements within its body. It takes the following ... 7/25/2012 9:32:04 AM
|