dco045
25-01-2018, 00:51
HI,
I get a broblem with Windows shortcuts.
With win explorer I create a shortcut pointing on the file "program.asm1802" named "my_shortcut".
Win utilities (as editor ) invoked with the shortcut name, works on the real pointed to file "program.asm1802" as I think it would be,
but thinBasic program below returns %FALSE (0) in dummy1 and %TRUE (1) in dummy2
Do I make a mistake or ThinBasic dislikes windows shortcuts ?
Regards
Dany
'---Load Console and File modules
Uses "Console"
Uses "file"
Dim dummy1 As Long
Dim dummy2 As Long
Dim file_name As String = "my_shortcut"
dummy1 = FILE_Exists(file_name)
PrintL file_name & " file exists ? ", dummy1
file_name = "program.asm1802"
dummy2 = FILE_Exists(file_name)
PrintL file_name & " file exists ? ", dummy2
'---Wait for a key press
PrintL "Press a key to end program"
WaitKey( 30 )
I get a broblem with Windows shortcuts.
With win explorer I create a shortcut pointing on the file "program.asm1802" named "my_shortcut".
Win utilities (as editor ) invoked with the shortcut name, works on the real pointed to file "program.asm1802" as I think it would be,
but thinBasic program below returns %FALSE (0) in dummy1 and %TRUE (1) in dummy2
Do I make a mistake or ThinBasic dislikes windows shortcuts ?
Regards
Dany
'---Load Console and File modules
Uses "Console"
Uses "file"
Dim dummy1 As Long
Dim dummy2 As Long
Dim file_name As String = "my_shortcut"
dummy1 = FILE_Exists(file_name)
PrintL file_name & " file exists ? ", dummy1
file_name = "program.asm1802"
dummy2 = FILE_Exists(file_name)
PrintL file_name & " file exists ? ", dummy2
'---Wait for a key press
PrintL "Press a key to end program"
WaitKey( 30 )