Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to save all SET settings?
Message
De
01/10/2004 14:02:20
 
 
À
01/10/2004 11:57:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00947972
Message ID:
00948033
Vues:
21
>Is there a command/function to save all SET settings, e.g. BELL, TALK, EXCLUSIVE, EXACT, etc. in an array/file? I would like save current settings, make changes and then restore settings while running a program.
>
>Thanks.

This is not complete, but it is short:
CLEAR
PRIVATE aSet,aSubSet,aSubSet2,i,k,j,sSet
DIMENSION aSet[50*2],asubSet2[1]
tmpFile=ADDBS(SYS(2023))+SYS(2015)+'.tmp'
LIST STATUS TO FILE (m.tmpFile) NOCONSOLE
=ALINES(aStatus,FILETOSTR(m.tmpFile))
ERASE (m.tmpFile)
sSet=''
FOR k=29 TO 33
	sSet=m.sSet + aStatus[m.k]
NEXT
i=1
FOR k=1 TO ALINES(aSubSet,m.sSet," - ")
	i=m.i+ACOPY(asubSet2,aSet,1,ALINES(asubSet2,STRTRAN(aSubSet[k],' ',CHR(13),1,1),.T.),m.i)
NEXT
DIMENSION aSet[BITRSHIF(m.i,1),2]
ASORT(aSet,1)
FOR k=1 TO ALEN(aSet,1)
	? aSet[m.k,1],aSet[m.k,2]
NEXT
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform