Ces stagiaires... lol

Ces stagiaires... lol - VB/VBA/VBS - Programmation

Marsh Posté le 08-11-2004 à 16:45:17    

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

Reply

Marsh Posté le 08-11-2004 à 16:45:17   

Reply

Marsh Posté le 08-11-2004 à 17:23:11    

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)
Reply

Marsh Posté le 08-11-2004 à 17:24:21    

marrant mais 3615malife aussi :o

Reply

Marsh Posté le 08-11-2004 à 17:26:47    

trop llllllllllllllaaaaaaaaaaauuuuuuuuuuullllllllllllleeeeeeeee


---------------
IVG en france
Reply

Marsh Posté le 08-11-2004 à 17:28:28    

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)
Reply

Marsh Posté le 08-11-2004 à 17:32:45    

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)
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed