Une instruction sur plusieurs lignes ? [Réponse : Non]

Vous débutez et vous avez besoin d'aide ? N'hésitez pas à poser vos questions
Norswap
Messages : 11
Inscription : sam. 14/mars/2009 13:35

Une instruction sur plusieurs lignes ? [Réponse : Non]

Message par Norswap »

Tout est dans le titre, y a-t-il un moyen de répartir une instruction sur plusieurs lignes ? (comme avec \\ en python)
Dernière modification par Norswap le sam. 14/mars/2009 22:28, modifié 1 fois.
Backup
Messages : 14526
Inscription : lun. 26/avr./2004 0:40

Re: Une instruction sur plusieurs lignes ?

Message par Backup »

Norswap a écrit :Tout est dans le titre, y a-t-il un moyen de répartir une instruction sur plusieurs lignes ? (comme avec \\ en python)
clairement non !

mais le purebasic n'a pas de fonctions qui aient des paramètres qui oblige a ça, non plus :)

certains ici demande cette fonctionalités ...
moi je trouve que ça embrouille , mais bon ...
Norswap
Messages : 11
Inscription : sam. 14/mars/2009 13:35

Message par Norswap »

Code : Tout sélectionner

OpenWindow(0, 0, 0, 800, 600, "Simple Dojo", #PB_Window_ScreenCentered | #PB_Window_TitleBar | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_SystemMenu)
Ca dépasse de ma fenêtre et ça me rend triste...
Backup
Messages : 14526
Inscription : lun. 26/avr./2004 0:40

Message par Backup »

au pire tu peux faire

Code : Tout sélectionner

Macro SC
#PB_Window_ScreenCentered
EndMacro

Macro TB
 #PB_Window_TitleBar 
EndMacro

Macro MG
    #PB_Window_MinimizeGadget
EndMacro

Macro MaG
      #PB_Window_MaximizeGadget 
EndMacro

Macro SG 
     #PB_Window_SizeGadget 
EndMacro
SC  TB MG MaG SG  SM

Macro SM
     #PB_Window_SystemMenu
EndMacro


OpenWindow(0, 0, 0, 800, 600, "Simple Dojo",  SC| TB|MG|MaG| SG| SM)
:D
Norswap
Messages : 11
Inscription : sam. 14/mars/2009 13:35

Message par Norswap »

Un pas en avant, deux pas en arrière :D
Backup
Messages : 14526
Inscription : lun. 26/avr./2004 0:40

Message par Backup »

:)
sospel
Messages : 56
Inscription : ven. 05/déc./2008 21:47

Message par sospel »

Bonjour Norswap,
j'avais le même problème, et voici comment je l'ai résolu :

Code : Tout sélectionner

      ValOptions = 0
      ValOptions = ValOptions | #PB_Window_SystemMenu
      ValOptions = ValOptions | #PB_Window_MinimizeGadget
      ValOptions = ValOptions | #PB_Window_SizeGadget
      ValOptions = ValOptions | #PB_Window_TitleBar
      ValOptions = ValOptions | #PB_Window_ScreenCentered
      ValOptions = ValOptions | #PB_Window_MaximizeGadget    
     ;;; ValOptions = ValOptions | #PB_Window_Maximize         ; <== si inutile 
       
 
       OpenWindow(#Fenetre, x, y, LargeurInterne, HauteurInterne, Titre$ , ValOptions)    

Avantages :
- la ligne entière tient sur l'écran
- on peut supprimer l'une des options en la mettant en commentaire.

Voilà ! Si ça peut t'aider ...
Backup
Messages : 14526
Inscription : lun. 26/avr./2004 0:40

Message par Backup »

pas bete !! :D
Avatar de l’utilisateur
Kwai chang caine
Messages : 6989
Inscription : sam. 23/sept./2006 18:32
Localisation : Isere

Message par Kwai chang caine »

Ouaih, l'idée est bonne 8)
Tant qu'on y est on peut peut etre faire encore plus court :roll:

Code : Tout sélectionner

ValOptions = 0 
ValOptions = ValOptions | #PB_Window_SystemMenu 
ValOptions = ValOptions | #PB_Window_MinimizeGadget 
ValOptions = ValOptions | #PB_Window_SizeGadget 
ValOptions = ValOptions | #PB_Window_TitleBar 
ValOptions = ValOptions | #PB_Window_ScreenCentered 
ValOptions = ValOptions | #PB_Window_MaximizeGadget    
     ;;; ValOptions = ValOptions | #PB_Window_Maximize         ; <== si inutile 
Debug ValOptions

ValOptions = 0 
ValOptions | #PB_Window_SystemMenu 
ValOptions | #PB_Window_MinimizeGadget 
ValOptions | #PB_Window_SizeGadget 
ValOptions | #PB_Window_TitleBar 
ValOptions | #PB_Window_ScreenCentered 
ValOptions | #PB_Window_MaximizeGadget    
     ;;; ValOptions | #PB_Window_Maximize         ; <== si inutile 
Debug ValOptions
Répondre