FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC

Développement d'applications avec le langage Panoramic
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  MembresMembres  Connexion  
Derniers sujets
» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
Création de fonctions inexistantes en Panoramic. Emptypar Klaus Aujourd'hui à 10:13

» PANORAMIC V 1
Création de fonctions inexistantes en Panoramic. Emptypar papydall Aujourd'hui à 01:22

» select intégrés [résolu]
Création de fonctions inexistantes en Panoramic. Emptypar jjn4 Hier à 15:00

» number_mouse_up
Création de fonctions inexistantes en Panoramic. Emptypar jjn4 Hier à 09:59

» Aide de PANORAMIC
Création de fonctions inexistantes en Panoramic. Emptypar jjn4 Hier à 09:16

» trop de fichiers en cours
Création de fonctions inexistantes en Panoramic. Emptypar lepetitmarocain Hier à 08:43

» Je teste PANORAMIC V 1 beta 1
Création de fonctions inexistantes en Panoramic. Emptypar papydall Hier à 02:17

» bouton dans autre form que 0
Création de fonctions inexistantes en Panoramic. Emptypar leclode Lun 06 Mai 2024, 11:59

» KGF_dll - nouvelles versions
Création de fonctions inexistantes en Panoramic. Emptypar Klaus Lun 06 Mai 2024, 09:41

» Gestion d'un système client-serveur.
Création de fonctions inexistantes en Panoramic. Emptypar Klaus Lun 06 Mai 2024, 08:23

» @Jack
Création de fonctions inexistantes en Panoramic. Emptypar Jack Mar 30 Avr 2024, 18:40

» Une calculatrice en une ligne de programme
Création de fonctions inexistantes en Panoramic. Emptypar jean_debord Dim 28 Avr 2024, 06:47

» Form(résolu)
Création de fonctions inexistantes en Panoramic. Emptypar leclode Sam 27 Avr 2024, 15:59

» Bataille navale SM
Création de fonctions inexistantes en Panoramic. Emptypar jjn4 Ven 26 Avr 2024, 15:39

» Les maths du crocodile
Création de fonctions inexistantes en Panoramic. Emptypar jean_debord Jeu 25 Avr 2024, 08:37

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Mai 2024
LunMarMerJeuVenSamDim
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendrierCalendrier

 

 Création de fonctions inexistantes en Panoramic.

Aller en bas 
AuteurMessage
pan59

pan59


Nombre de messages : 367
Age : 66
Localisation : Wattignies
Date d'inscription : 16/10/2011

Création de fonctions inexistantes en Panoramic. Empty
MessageSujet: Création de fonctions inexistantes en Panoramic.   Création de fonctions inexistantes en Panoramic. EmptyMar 12 Nov 2013, 13:41

Bonjour à tous.

Je viens de développer un programme afin de créer des fonctions inexistantes en Panoramic.

Bon usage à tous, et merci d'avance de vos commentaires et suggestions.

Code:
dim a$, b$, dernier_argument$, fonction$, liste_argument$, resultat$, t$
dim argument$(10)
dim kk%, res%, resultat%, true%, yy%

true%=1

label traiter_fonction

edit 100
left 100,-200
on_change 100,traiter_fonction

' Placer les arguments chaînes entre '' et non entre "".
' Correspond à b$=TrimLeft$("-----Bonjour","-")
text 100,"TrimLeft$('-----Bonjour','-',b$)"
message b$

text 100,"Instr('Bonjour','j',5,res%)"
message str$(res%)

end

traiter_fonction:

   t$=text$(100)
   if len(t$)>0
      t$=left$(t$,len(t$)-1)

      yy%=instr(t$,"(")
      fonction$=left$(t$,yy%-1)
      liste_argument$=mid$(t$,yy%+1,len(t$))
  
      lire_arguments()
  
      traiter_fonction()
  
      enregistrer_resultat()
   end_if
  
return

sub lire_arguments()

    kk%=0
    while true%=1
        yy%=instr(liste_argument$,",")
        if yy%=0 then exit_while
        
        kk%=kk%+1
        argument$(kk%)=left$(liste_argument$,yy%-1)
        if left$(argument$(kk%),1)="'"
           argument$(kk%)=left$(argument$(kk%),len(argument$(kk%))-1)
           argument$(kk%)=mid$(argument$(kk%),2,len(argument$(kk%)))
        end_if

        liste_argument$=mid$(liste_argument$,yy%+1,len(liste_argument$))
    end_while

    dernier_argument$=liste_argument$

end_sub

sub traiter_fonction()

    if fonction$="TrimLeft$"
       resultat$=argument$(1)
       while true%=1
             if left$(resultat$,1)<>argument$(2) then exit_while
             resultat$=mid$(resultat$,2,len(resultat$))
       end_while
    end_if

    ' Instr('Bonjour','j',5,res%)
    if fonction$="Instr"
       resultat%=val(argument$(3))+instr(mid$(argument$(1),val(argument$(3)),len(argument$(1))),argument$(2))
       if resultat%<val(argument$(3)) then resultat%=0
    end_if

end_sub

sub enregistrer_resultat()

    if dernier_argument$="a$" then a$=resultat$
    if dernier_argument$="b$" then b$=resultat$
    
    if dernier_argument$="res%" then res%=resultat%
    
end_sub
Revenir en haut Aller en bas
 
Création de fonctions inexistantes en Panoramic.
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Pour Klaus et Jack: création de fonctions inexistantes.
» Auto création d'un Menu Panoramic
» Programme création de site web en Panoramic
» Assistant de création de menu Panoramic
» Création d'un '.exe' à partir d'un programme Panoramic.

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: Vos sources, vos utilitaires à partager-
Sauter vers: