Programmers only

Pink

(Mooncrasher)
Staff member
Team Valiant
Discord Staff
Voyager Quest
Man on the Moon
Forum Legend
No... it was at least two desktop computers ago....
(in the mid 2000s)
 

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.
But if break is absent. No exit. Result it continues
 
Last edited:

Tony

Registered
But if break is absent. No exit. Result it continues

Code:
int val = 1;
switch (val)
{
   case 1:
      printf ("val=1\n");
      break;
   case 2:
      printf ("val=2\n");
      break;
}
Tuto :

switch ( expression )
{
case expression1 : liste-d'instructions
break;option
case expression2 : liste-d'instructions
break;option
....

case expressionn : liste-d'instructions
break;option
default : liste-d'instructions
}
 

Tony

Registered
I am honored that you accept me on the forum despite my English translation. Unfortunately I can't do better. I have no vocabulary in English. Thank you
 
Last edited:
T

The Dark in the Light

Guest
I've been wanting to get into programming for awhile now, but am unsure of where to start. I know I want to try Javascript, but where am I supposed to run the code and see it work?
 

bobbblair123

ሁልጊዜ ንጹህ የውስጥ ሱሪዎችን ይልበሱ
TEAM HAWK
Swingin' on a Star
Atlas
Fly me to the Moon
Under Pressure
Registered
About all I can give you guys is a history lesson. (Look up Motorola 68000). Today it's unreal engine etal. Something fun is "learn Android with source code" Google play store. Getting into any kind of depth is tedious and frustrating :p computers are still nothing but a whole bunch of really fast on/off switches :p one wrong switch out of billions and you're screwed. I just saw sheepys post in another thread and thought I'd direct him this way.
 

Space pilot

ET phone home
Floater
Man on the Moon
Registered
Rocket = "Saturn_V"
Fairing_1 = "Saturn_V_payload_fairing"
Fairing_2 = "N1_payload_fairing"

if(Rocket == Fairing_1)
print(Woow nice Saturn V)

if(Model == Fairing_2)
print(You got the wing fairing fool)
__________________________________________

Output:
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
Rocket = "Saturn_V"
Fairing_1 = "Saturn_V_payload_fairing"
Fairing_2 = "N1_payload_fairing"

if(Rocket == Fairing_1)
print(Woow nice Saturn V)

if(Model == Fairing_2)
print(You got the wing fairing fool)
__________________________________________

Output:
Well, I didn't expect that from you :p
 

Sheepy

Planet Sculptor
Biker Mice from Mars
ET phone home
Registered
This is a discord bot im making in python (client.run('TOKEN') is the last line of code


(Repost from my other thread)
 

bobbblair123

ሁልጊዜ ንጹህ የውስጥ ሱሪዎችን ይልበሱ
TEAM HAWK
Swingin' on a Star
Atlas
Fly me to the Moon
Under Pressure
Registered
Here's a little c++ program that will determine if a number is prime. Note boolean variable set to true at the beginning. Uses if, if...else, a nested if...else, for loop, break and continue. I'm thinking james was taking some programming? I almost busted out laughing when he caught a syntax error. A missing }. I told him good catch, Pathfinder told him sharp eyes and he was almost belligerent. He didn't have good eyes it was OBVIOUS. I'm telling you not 1 in 10 would have spotted it. That's one issue with programming. Computers are literal. Well they're already designing their own next gen circuits. Humans can't do it. They'll be programming themselves before much longer. AI is developing in ways we never dreamed of. Computers are developing synaptic connections. Anyway, my last programming post unless something comes up. I really an just a hack.

C++