Procedure GetDriveType(Parameter.s)
Select GetDriveType_(Parameter)
Case 2
Result = 2;"Floppy"
Case 3
Result = 3;"Drive Fixed"
Case 4
Result = 4;"Remote"
Case 5
Result = 5;"Removable"
Case 6
Result = 6;"Ram disk"
Default
Result = 7;"Unknown"
EndSelect
ProcedureReturn Result
EndProcedure
Procedure FindDrives()
*DriveBuffer = AllocateMemory(255)
For i = 0 To GetLogicalDriveStrings_(255, *DriveBuffer)
DriveL = PeekB(*DriveBuffer + i)
Drives.s = Drives.s + Chr(DriveL)
Next
Debug Drives.s
Slash = CountString(Drives,"\",1)
For Divide = 1 To Slash=1
DriveLetter.s = StringField(Drives,Divide,"\")+"\"
If DriveLetter <> ""
AddElement(Drives())
Drives() = DriveLetter
Debug DriveLetter
EndIf
Next Divide
ResetList(Drives())
ProcedureReturn
EndProcedure
Is this a bug in PB or it's just me? Shouldn't the compiler warn before calling FASM?
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Well, if PB takes 'Slash=1' as an expression (like If Slash=1) then that could be why it doesn't raise an error. That doesn't sound like normal PB behaviour to me, though.
~I see one problem with your reasoning: the fact is thats not a chicken~
But this is not all the code (the whole file was ~75 kb long)... However, the threadsafe option was on, if this helps. Hope it's nothing that can't be fixed .
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)