Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2237 connectés 

  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  Ces stagiaires... lol

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Ces stagiaires... lol

n°893466
Arjuna
Aircraft Ident.: F-MBSD
Posté le 08-11-2004 à 16:45:17  profilanswer
 

Il y a quelques mois, une stagiaire en fin de cycle d'école d'ingé a bossé avec moi.
 
Un jour qu'elle travaillait sur une fonction d'authentification, elle vient vers moi et me pose une question plutôt bateau style "j'ai une boucle, et je dois voir si c'est égal à une valeur, mais je sais pas comment retourner que je l'ai trouvée".
 
Donc je lui réponds bêtement :
- Ben... Utilise une variable tampon...
- :??:
- Ouais, tu sais, en coton avec une ficelle comme tous les 28 du mois
- :heink:
- Ben dans ta boucle, t'initialise une variable avec une valeur bidon si tu trouves et tu sors de la fonction. Si quand t'as fini, la variable à cette valeur, alors c'est que t'as trouvé...
- http://forum.hardware.fr/icones/message/icon3.gif
 
Là, je dois faire une modif dans le code, et je tombe sur ça :lol:

Code :
  1. function check(PWD)
  2. if len(PWD) > 8 or len(PWD) < 6 then
  3.  check=true
  4. elseif isNumeric(left(PWD, 1)) then
  5.  check=true
  6. elseif isNumeric(right(PWD, 1)) then
  7.  check=true
  8. else
  9.  i = 2
  10.  tampax=""
  11.  do while i < len(PWD) and tampax=""
  12.   if isNumeric(mid(PWD, i, 1)) then
  13.    tampax="ok"
  14.   end if
  15.   i = i + 1
  16.  loop
  17.  if tampax="" then
  18.   check=true
  19.  else
  20.   check=false
  21.  end if
  22. end if
  23. end function

mood
Publicité
Posté le 08-11-2004 à 16:45:17  profilanswer
 

n°893516
drasche
Posté le 08-11-2004 à 17:23:11  profilanswer
 

3615 MyLife :o
-> blabla@prog :o


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
n°893520
Profil sup​primé
Posté le 08-11-2004 à 17:24:21  answer
 

marrant mais 3615malife aussi :o

n°893527
uriel
blood pt.2
Posté le 08-11-2004 à 17:26:47  profilanswer
 

trop llllllllllllllaaaaaaaaaaauuuuuuuuuuullllllllllllleeeeeeeee


---------------
IVG en france
n°893529
drasche
Posté le 08-11-2004 à 17:28:28  profilanswer
 

Je te l'accorde, j'ai ri [:bien]
(ce qui est moins bien, c'est quand je dois expliquer aux voisins pourquoi je ris [:nul])


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
n°893538
Harkonnen
Modérateur
Un modo pour les bannir tous
Posté le 08-11-2004 à 17:32:45  profilanswer
 

ok, on s'est bien marrés, mais y'a une section spéciale pour ça hein :o


---------------
J'ai un string dans l'array (Paris Hilton)

Aller à :
  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  Ces stagiaires... lol

 

Sujets relatifs
Plus de sujets relatifs à : Ces stagiaires... lol


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)