07 Mar 96 21:24, James Goldbloom escrib¡a a Carles Mateo:
Hi James!
JG> I use this in one of my programs (look for the array sort line):
Let me slightly improve your method... At least, I think I will.
-----------------------====---------------------------------
>-------------------------------------------------------------------------
>sub highseek public shared
>on error goto GENERICTRAP
>lg$="WriteTo path being examined for HIGHEST NETMAIL...":call logadd
>color 9:print chr$(254);:color 11:print" Studying WriteTo Directory for
>HIGHEST Netmail...";
[...]
Dim HighNet as LONG 'Remenber, fido netmails should be 0 > NetNum > 32767
HighNet=HighSeek("C:\NETMAIL\")
If HighNet>0 Then
Print "The higher netmail number is:";HighNet
Else
Print "There are not netmails in path"
End If
End
Function HighSeek (OutBoundPath as STRING) as LONG
Dim HighNet as LONG ' INTEGER may be enought but...
Dim ThisNet as STRING
On Error Goto GenericTrap
ThisNet=Dir$(OutBoundPath+"*.MSG")
Do While Len(ThisNet)>0
' If you want full checking, uncomment this lines and use them
instead.
' If Remove$(ThisNet, Any "0123456789")=".MSG" Then
' HighNet=Max(Val(ThisNet),HighNet)
' End If
HighNet=Max(Val(ThisNet),HighNet)
ThisNet=Dir$
Loop
HighSeek=HighNet
End Function
Saludotes,
,,, JOS (2:348/102)
`0-0' mejuto@sfdzuma.usc.es
/-(_)-\ jmejuto@redestb.es
http://www.geocities.com/SiliconValley/4551
--- FD2.12+ & GoldED 2.50+ & FE145+
---------------
* Origin: -=EDI=BBS=- 28800 //V34/VFC// Santiago //+34-81-502110 (2:348/102)
|