Programmers only

Tony

Registered
C:
int val = 1;
switch (val)
{
   case 1:
      printf ("val=1\n");
   case 2:
      printf ("val=2\n");
}
Easy to find error
whatever the value of val the result is always the same.
 

Tony

Registered
JavaScript allows you to write code using only the web browser's internal compiler. you don't need anything else. this works whatever the operating system used
 

Pink

(Mooncrasher)
Staff member
Team Valiant
Discord Staff
Voyager Quest
Man on the Moon
Forum Legend
Back to our regularly scheduled programming
Simple javascript test

Code:
<html>
<body>
<script Language = "JavaScript">

var n = "Test";
document.write ('welcome = ' + n);

</script>
</body>
</html>
It worked!
TonyHTML.png
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
C:
int val = 1;
switch (val)
{
   case 1:
      printf ("val=1\n");
   case 2:
      printf ("val=2\n");
}
Easy to find error
whatever the value of val the result is always the same.
Easy one indeed. I won't spoil the answer though :p
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
Condense o_Oo_Oo_O

Seriously, look at my alert tab:
Screenshot_20200822-125645_Firefox.jpg

Also remember that during a few minutes you can still edit a post. Sometimes you can add something to your post without writing a new one.

C:
int val = 1;
switch (val)
{
   case 1:
      printf ("val=1\n");
   case 2:
      printf ("val=2\n");
}
Easy to find error
whatever the value of val the result is always the same.
Wait, is the output really always the same whatever the value of val? There's a bug when val=1, but I don't think it happens when val=2...
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend

Mars Pathfinder

«★★» CMDR «★★» // PT // FartFinder
Christmas Event Category Winner
TEAM HAWK
Swingin' on a Star
Atlas
Deja Vu
Fly me to the Moon
Under Pressure
Registered
1598094806246.png

what the does this first 2 application do??

just ignore the last one if anyone don't know it....