Author Topic: Problem started with QB64 this morning  (Read 8632 times)

0 Members and 1 Guest are viewing this topic.

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline Phil_Clark

  • Newbie
  • Posts: 7
    • View Profile
Problem started with QB64 this morning
« on: August 20, 2018, 11:09:20 am »
I have a tower computer that is running Windows 10. I have programs that I have written myself in BASIC and these are compiled using BASIC 64.

All of my programs were running without problems until this morning UK Time (August 20th). Then I found that about half of these programs are no longer running. No error messages are appearing.

I have tried to recompile the offending programs and no error messages appear: no change. Of course, I have rebooted the computer: no change. I have spent four hours with the Microsoft help desk and the best that they can come up with is that I install Windows 7 or 8 on my computer!

Does anyone know what might be going on here, please? Microsoft says that the programs aren't "compatible" with Windows 10, although they were until I turned off the computer yesterday. And it is only about half of the programs that aren't running.

Many thanks in advance for any ideas or assistance which anyone can give please.

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: Problem started with QB64 this morning
« Reply #1 on: August 20, 2018, 11:24:22 am »
I have some suggestions, first check for viruses, if you are confident that you PC is virus free then try running the applications in compatibility mode or if that don't work run as administrator, it's possible that your programs are using features/functions that Windows now considers a security risk.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Problem started with QB64 this morning
« Reply #2 on: August 20, 2018, 11:26:27 am »
« Last Edit: August 20, 2018, 11:31:06 am by bplus »

Offline Phil_Clark

  • Newbie
  • Posts: 7
    • View Profile
Re: Problem started with QB64 this morning
« Reply #3 on: August 20, 2018, 11:55:54 am »
Looks like BASIC 64 is something different from QB64: https://www.google.com/search?q=BASIC+64&client=opera&hs=Two&tbm=isch&source=iu&ictx=1&fir=i9WHAQUfYU1phM%253A%252Ci94gTOsSrh_vnM%252C_&usg=AFrqEzfss7VAITBX4Zd6dvvC4dzK-gD09g&sa=X&ved=2ahUKEwjf0KqN-PvcAhUl3YMKHXTaAEgQ9QEwDHoECAQQBg#imgrc=i9WHAQUfYU1phM:
For the record are you talking about QB64 programs?
Do you have a small program as sample that is not working?

Apologies for being a bit sloppy with terminology.   I am talking about QB64 programs for 64 bit computers.   And for an earlier reply, I have scanned for viruses and found none.   I have tried compatibility mode and as an administrator and still nothing is happening.   All I get is that the program is not compatible with Windows 10.

I don't think that I can attach a file so this is the code from the program which stopped running this morning.   It takes in data like (these are called Two Line Orbital Elements):

1 42798U 17037A   18213.86390634 +.00005237 +00000-0 +84071-4 0    03
2 42798 097.8577 275.8761 0252190 237.9728 119.6767 15.25104219059593

And then the program extracts data from various fields and calculates various orbital data.   I hope that it makes sense.


Code: QB64: [Select]
  1. REM   NAME = TLEORBIT.BAS
  2.  
  3. REM   This program has been completely re-designed and re-written.
  4.  
  5. REM   Program accepts the name of a file of Two-Line Orbital Elements
  6. REM   and will then process it into one of four output file formats:-
  7. REM      1 - Basic orbital data
  8. REM      2 - ASCII file which can be impoted by Lotus 1-2-3
  9. REM      3 - Both options 1 and 2
  10. REM      4 - Orbital data file with groundtrack and precession data
  11. REM      5 - Orbital data for objects in GEO
  12. REM   Re-designed program prepared 07.11.2001.
  13.  
  14. REM   Program once more re-designed.   The option to have output files
  15. REM   for both basic orbital data and Lotus 1-2-3 created was deleted:
  16. REM   these files can still be created using the individual options 1
  17. REM   and 2.   The Lotus 1-2-3 output file was changed, so that the
  18. REM   raw TLE data would no longer be included.   A new option was added
  19. REM   to create an ASCII file which could be read into Excel for
  20. REM   a spreadsheet in that format.   Finally, the definitions specific
  21. REM   to WordStar ASCII files were removed since the files need to be
  22. REM   imported to Word as well.
  23. REM   Modified 13.9.2002.
  24.  
  25. REM   Excel option updated because Excel cannot handle date/epoch functions.
  26. REM   Modified 26.6.03.
  27.  
  28. REM   Modified to reflect drives and paths to use with COMPAQ computer
  29. REM   Modified 18.04.2007
  30.  
  31. REM   Modified to include option to produce shortened version of a one-line
  32. REM   element set which can be used in an Excel spreadsheet.
  33. REM   Modified 24.11.2008
  34.  
  35. REM   Minor modification to include blank lines when preparing the .ORB
  36. REM   Modified 24.11.2013
  37.  
  38. REM   Program modified to include an additional option for extracing GEO
  39. REM   data for EXCEL spreadsheets.
  40. REM   Modified 21.02.2015
  41.  
  42. REM   Minor modifications made to some output data.
  43. REM   Modified 27.03.2017
  44.  
  45.  
  46. REM   Screen colours
  47. REM   14      Yellow foreground
  48. REM    1      Blue background
  49. COLOR 14, 1
  50.  
  51. REM   Read drive definitions from external file
  52. OPEN "e:\menu\drives.txt" FOR INPUT AS #1
  53. INPUT #1, drive1$
  54. INPUT #1, drive2$
  55. INPUT #1, drive3$
  56.  
  57. REM   Definitions of disk drives for Compaq laptop computer.
  58. REM   Hard disk
  59. hdisk$ = drive1$
  60.  
  61. REM   Options for data output
  62. REM   Output to hard drive
  63. hout$ = hdisk$ + "output\"
  64.  
  65.  
  66. REM   Hard drive for output
  67. outh$ = hdisk$ + "output\"
  68.  
  69. REM   Define standard directory paths
  70. drivec1$ = outh$
  71. drivec2$ = "H"
  72.  
  73. REM   Define constants
  74. REM   Conversion factor from degrees to radians.
  75. fact# = 3.1415265# / 180#
  76. REM   Earth's mean radius
  77. re# = 6378.145#
  78. REM   Radius of geostationary orbit
  79. r24# = 42241.122#
  80. REM   Coefficient of precession formulae
  81. j2# = .013324511#
  82. REM   Term used for calculating the drift rate of GEO objects
  83. drift0# = 1.00273791#
  84.  
  85. REM   Define defalt drive data: drive C.
  86. drive1a$ = drivec1$
  87. drive2a$ = drivec2$
  88.  
  89.  
  90. REM   Define headers for output reports.
  91. REM   Top and end of report for basic orbital data
  92. top11$ = "=========================================================================="
  93. top12$ = "Catalogue      Orbital      Orbital    Orbital  Perigee    Apogee   Arg of"
  94. top13$ = "  Number        Epoch     Inclination   Period                     Perigee"
  95. top14$ = "                              deg         min      km        km      deg"
  96. top15$ = "--------------------------------------------------------------------------"
  97. REM       nnnnn       yyyy mmm dd.dd  iii.ii    p,ppp.pp   pp,ppp   aaa,aaa    aaa
  98. end11$ = "=========================================================================="
  99.  
  100. REM   Output for report which includes groundtrack data
  101. top41$ = "===================================================================================================================="
  102. top42$ = "Catalogue   Epoch             Incl    Node RA   Node-DOT    Period   Perigee   Apogee    AoP    AoP-DOT     Ground"
  103. top43$ = "Number                         deg      deg      deg/day      min       km       km      deg    deg/day    Track deg"
  104. top44$ = "--------------------------------------------------------------------------------------------------------------------"
  105. REM       nnnnn       yyyy mmm dd.dd   iii.ii    nnn.nn   -nn.nnnn   pppp.pp    ppppp    aaaaaa    aaa   -aa.aaaa     ggg.gg
  106. end41$ = "===================================================================================================================="
  107.  
  108. REM   Output for report for GEO data
  109. top51$ = "============================================================================================="
  110. top52$ = "Catalogue      Orbital      Orbital    Orbital  Perigee    Apogee   Arg of   Long     Drift"
  111. top53$ = "  Number        Epoch     Inclination   Period                     Perigee   deg E  deg E/day"
  112. top54$ = "---------------------------------------------------------------------------------------------"
  113. REM       nnnnn       yyyy mmm dd.dd  iii.ii    p,ppp.pp   pp,ppp   aaa,aaa    aaa     lll     +dd.ddd
  114. end51$ = "============================================================================================="
  115.  
  116. REM   Define the gap between lines of data: this separates data for different
  117. REM   objects.
  118. gap$ = "   "
  119.  
  120. REM   Run the program
  121. GOSUB 100
  122.  
  123.  
  124.  
  125.  
  126. 100
  127. REM   Subroutine which prints the menu for converting TLE data to
  128. REM   text files of orbital data.
  129. 110
  130. GOSUB 10000
  131.  
  132. LOCATE 10, 15
  133. PRINT "Enter name of TLE file to be processed:"
  134. LOCATE 15, 21
  135. PRINT "Press 'RETURN' to terminate this loop"
  136.  
  137. 120
  138. LOCATE 10, 57
  139. PRINT "         "
  140. LOCATE 10, 57
  141. IF option$ = "" THEN GOTO 199
  142. IF option$ = "Q" THEN GOTO 199
  143. IF option$ = "C" THEN GOSUB 6000: GOTO 120
  144. IF option$ = "H" THEN GOSUB 6000: GOTO 120
  145. IF option$ = "F" THEN GOSUB 6000: GOTO 120
  146.  
  147.  
  148. infile$ = option$
  149. LOCATE 10, 57
  150. PRINT "         "
  151. LOCATE 10, 57
  152. PRINT infile$
  153.  
  154. REM   Assign names for output files.
  155. inname1$ = drive1$ + infile$ + ".elm"
  156. outname1$ = drive1a$ + infile$ + ".orb"
  157. outname2$ = drive1a$ + infile$ + ".txt"
  158. outname3$ = drive1a$ + infile$ + ".txt"
  159. outname4$ = drive1a$ + infile$ + ".dat"
  160. outname5$ = drive1a$ + infile$ + ".geo"
  161.  
  162. REM   Choose the files which are to be created.
  163. GOSUB 10000
  164. LOCATE 15, 21
  165. PRINT "                                     "
  166.  
  167. LOCATE 9, 17
  168. PRINT "Choose the formats of the files to be created"
  169. LOCATE 11, 17
  170. PRINT "1.  Basic orbital data ASCII text file"
  171. LOCATE 12, 17
  172. PRINT "2.  ASCII Lotus 1-2-3 .TXT file"
  173. LOCATE 13, 17
  174. PRINT "3.  ASCII Excel 97 .TXT file"
  175. LOCATE 14, 17
  176. PRINT "4.  ASCII text file with groundtrack"
  177. LOCATE 15, 17
  178. PRINT "5.  Text data for GEO objects"
  179. LOCATE 16, 17
  180. PRINT "6.  EXCEL data for GEO objects"
  181. LOCATE 17, 17
  182. PRINT "7.  Shortened one-line file"
  183.  
  184. LOCATE 20, 17
  185. PRINT "Choose an option 1, 2, 3, 4, 5 or 6:"
  186. 130
  187. LOCATE 20, 57
  188. PRINT "     "
  189. LOCATE 20, 57
  190.  
  191. LOCATE 22, 23
  192. PRINT "                                  "
  193.  
  194. IF option$ = "" THEN option$ = "1": GOSUB 1000: GOTO 110
  195. IF option$ = "1" THEN GOSUB 1000: GOTO 110
  196. IF option$ = "2" THEN GOSUB 1000: GOTO 110
  197. IF option$ = "3" THEN GOSUB 1000: GOTO 110
  198. IF option$ = "4" THEN GOSUB 1000: GOTO 110
  199. IF option$ = "5" THEN GOSUB 1000: GOTO 110
  200. IF option$ = "6" THEN GOSUB 1000: GOTO 110
  201. IF option$ = "7" THEN GOSUB 1000: GOTO 110
  202. IF option$ = "C" THEN GOSUB 6000: GOTO 130
  203. IF option$ = "c" THEN GOSUB 6000: GOTO 130
  204. IF option$ = "F" THEN GOSUB 6000: GOTO 130
  205. IF option$ = "f" THEN GOSUB 6000: GOTO 130
  206. IF option$ = "H" THEN GOSUB 6000: GOTO 130
  207. IF option$ = "h" THEN GOSUB 6000: GOTO 130
  208. IF option$ = "1a" THEN GOSUB 1000: GOTO 110
  209. IF option$ = "1A" THEN option$ = "1a": GOSUB 1000: GOTO 110
  210. IF option$ = "4a" THEN GOSUB 1000: GOTO 110
  211. IF option$ = "4A" THEN option$ = "4a": GOSUB 1000: GOTO 110
  212.  
  213. REM   If this point has been reached then an invalid option has been
  214. REM   chosen.   Emit "beep" sound and print an error message onto the
  215. LOCATE 22, 23
  216. PRINT "WARNING - INVALID OPTION CHOSEN !!"
  217. GOTO 130
  218.  
  219. 199
  220.  
  221.  
  222. REM----------------------------------------------------------------------------
  223.  
  224.  
  225. 1000
  226. REM   This subroutine creates a file or series of files of orbital
  227. REM   data based upon a specified set of TLEs.
  228.  
  229. REM   Screen display of file being processed and the file(s) being
  230. REM   created.
  231. GOSUB 2000
  232. IF option$ = "1" THEN PRINT infile$ + ".orb"
  233. IF option$ = "1a" THEN PRINT infile$ + ".orb"
  234. IF option$ = "2" THEN PRINT infile$ + ".txt"
  235. IF option$ = "3" THEN PRINT infile$ + ".txt"
  236. IF option$ = "4" THEN PRINT infile$ + ".dat"
  237. IF option$ = "4a" THEN PRINT infile$ + ".dat"
  238. IF option$ = "5" THEN PRINT infile$ + ".geo"
  239. IF option$ = "6" THEN PRINT infile$ + ".txt"
  240. IF option$ = "7" THEN PRINT infile$ + ".txt"
  241.  
  242. REM   Set names of files which are to be processed.
  243. inname1$ = drive1a$ + infile$ + ".elm"
  244. outname1$ = drive1a$ + infile$ + ".orb"
  245. outname2$ = drive1a$ + infile$ + ".txt"
  246. outname3$ = drive1a$ + infile$ + ".txt"
  247. outname4$ = drive1a$ + infile$ + ".dat"
  248. outname5$ = drive1a$ + infile$ + ".geo"
  249.  
  250. OPEN inname1$ FOR INPUT AS #1
  251. IF option$ = "1" THEN OPEN outname1$ FOR OUTPUT AS #2
  252. IF option$ = "1a" THEN OPEN outname1$ FOR OUTPUT AS #2
  253. IF option$ = "2" THEN OPEN outname2$ FOR OUTPUT AS #3
  254. IF option$ = "3" THEN OPEN outname3$ FOR OUTPUT AS #4
  255. IF option$ = "4" THEN OPEN outname4$ FOR OUTPUT AS #5
  256. IF option$ = "4a" THEN OPEN outname4$ FOR OUTPUT AS #5
  257. IF option$ = "5" THEN OPEN outname5$ FOR OUTPUT AS #6
  258. IF option$ = "6" THEN OPEN outname3$ FOR OUTPUT AS #6
  259. IF option$ = "7" THEN OPEN outname3$ FOR OUTPUT AS #4
  260.  
  261.  
  262. IF option$ = "1" THEN GOSUB 3100: GOTO 1010
  263. IF option$ = "1a" THEN GOSUB 3100: GOTO 1010
  264. IF option$ = "4" THEN GOSUB 3400: GOTO 1010
  265. IF option$ = "4a" THEN GOSUB 3400: GOTO 1010
  266. IF option$ = "5" THEN GOSUB 3500: GOTO 1010
  267.  
  268.  
  269. 1010
  270.     LINE INPUT #1, tleline1$
  271.     LINE INPUT #1, tleline2$
  272.  
  273.     REM   Convert TLE data for format to be output to files being created.
  274.     GOSUB 4000
  275.     LOCATE 17, 52
  276.     PRINT catnum$
  277.  
  278.     REM   Based upon which option has been chosen, print output to appropriate
  279.     REM   file(s).
  280.     IF option$ = "1" THEN GOSUB 4100
  281.     IF option$ = "1a" THEN GOSUB 4100
  282.     IF option$ = "2" THEN GOSUB 4200
  283.     IF option$ = "3" THEN GOSUB 4300
  284.     IF option$ = "4" THEN GOSUB 4400
  285.     IF option$ = "4a" THEN GOSUB 4400
  286.     IF option$ = "5" THEN GOSUB 4500
  287.     IF option$ = "6" THEN GOSUB 4600
  288.     IF option$ = "7" THEN GOSUB 4700
  289.  
  290. IF option$ = "1" THEN PRINT #2, gap$: PRINT #2, end11$
  291. IF option$ = "1a" THEN PRINT #2, gap$: PRINT #2, end11$
  292. IF option$ = "4" THEN PRINT #5, gap$: PRINT #5, end41$
  293. IF option$ = "4a" THEN PRINT #5, gap$: PRINT #5, end41$
  294. IF option$ = "5" THEN PRINT #6, gap$: PRINT #6, end51$
  295.  
  296.  
  297.  
  298.  
  299. REM----------------------------------------------------------------------------
  300.  
  301.  
  302. 2000
  303. REM   Subroutine which displays the screen while TLEs are being processed
  304. REM   to produce files of basic orbital data, .WK3 files, .DAT files and
  305. REM   .GEO files.
  306. GOSUB 10000
  307. LOCATE 10, 16
  308. PRINT "TLE file being processed:"
  309. LOCATE 10, 52
  310. PRINT UCASE$(infile$) + ".ELM"
  311. LOCATE 14, 16
  312. PRINT "File(s) being created:"
  313. LOCATE 17, 16
  314. PRINT "Catalogue number being processed:"
  315. LOCATE 14, 52
  316.  
  317.  
  318.  
  319. REM----------------------------------------------------------------------------
  320.  
  321.  
  322. 3100
  323. REM   Headers for the file of basic orbital data (option 1).
  324. PRINT #2, top11$
  325. PRINT #2, top12$
  326. PRINT #2, top13$
  327. PRINT #2, top14$
  328. PRINT #2, top15$
  329. oldnum = 0
  330.  
  331.  
  332. REM----------------------------------------------------------------------------
  333.  
  334.  
  335. 3400
  336. REM   Headers for the file of orbital data with ground track details (option 4).
  337. PRINT #5, top41$
  338. PRINT #5, top42$
  339. PRINT #5, top43$
  340. PRINT #5, top44$
  341. oldnum = 0
  342.  
  343.  
  344. REM----------------------------------------------------------------------------
  345.  
  346.  
  347. 3500
  348. REM   Headers for the file of GEO data.
  349. PRINT #6, top51$
  350. PRINT #6, top52$
  351. PRINT #6, top53$
  352. PRINT #6, top54$
  353. oldnum = 0
  354.  
  355.  
  356. REM----------------------------------------------------------------------------
  357.  
  358.  
  359. 4000
  360. REM   Subroutine which extracts data from a TLE set and then calculates
  361. REM   the orbital data.   The lines of the element set are defined as
  362. REM   tleline1$ and tleline2$.
  363.  
  364. REM   Extract the satellite number being processed.
  365. catnum$ = MID$(tleline1$, 3, 5)
  366. newnum = VAL(catnum$)
  367.  
  368. REM   Extract the required data from the element set.
  369. REM   Year of epoch
  370. IF VAL(MID$(tleline1$, 19, 2)) > 55 THEN tleyear# = 1900 + VAL(MID$(tleline1$, 19, 2))
  371. IF VAL(MID$(tleline1$, 19, 2)) < 55 THEN tleyear# = 2000 + VAL(MID$(tleline1$, 19, 2))
  372. tleyear$ = STR$(tleyear#)
  373.  
  374. REM   Epoch day and decimal of a day
  375. tlepoch$ = MID$(tleline1$, 21, 12)
  376. tlepoch# = VAL(tlepoch$)
  377.  
  378. REM   Transform epoch to month and days equivalent.
  379. GOSUB 5000
  380.  
  381. REM   Orbital inclination
  382. tleincl$ = MID$(tleline2$, 9, 8)
  383. tleincl# = VAL(tleincl$)
  384.  
  385. REM   RA of ascending node
  386. tlenode$ = MID$(tleline2$, 18, 8)
  387. tlenode# = VAL(tlenode$)
  388.  
  389. REM   Eccentricity - remember that the element set omits the decimal point.
  390. tlee$ = MID$(tleline2$, 27, 7)
  391. tlee# = VAL(tlee$) / 10000000
  392.  
  393. REM   Argument of perigee
  394. tleaop$ = MID$(tleline2$, 35, 8)
  395. tleaop# = VAL(tleaop$)
  396.  
  397. REM   Mean anomaly
  398. tlema$ = MID$(tleline2$, 44, 8)
  399. tlema# = VAL(tlema$)
  400.  
  401. REM   Mean motion
  402. tlemm$ = MID$(tleline2$, 53, 12)
  403. tlemm# = VAL(tlemm$)
  404.  
  405. REM   Rev count
  406. tlerevs$ = MID$(tleline2$, 67, 2)
  407. tlerevs# = VAL(tlerevs$)
  408.  
  409. REM   Process TLE data for orbital data.
  410. REM   Orbital period
  411. period# = 1440 / tlemm#
  412. period$ = STR$(period#)
  413.  
  414. REM   Semi-major axis
  415. semi# = r24# * tlemm# ^ (-2 / 3)
  416.  
  417. REM   Perigee
  418. perigee# = semi# * (1 - tlee#) - re#
  419. perigee$ = STR$(perigee#)
  420.  
  421. REM   Apogee
  422. apogee# = semi# * (1 + tlee#) - re#
  423. apogee$ = STR$(apogee#)
  424.  
  425. REM   Precession of the nodes
  426. ndot# = -j2# * tlemm# ^ (7 / 3) * COS(fact# * tleincl#) / (1 - tlee# ^ 2) ^ 2
  427.  
  428. REM   Precesson of AoP
  429. aopdot# = j2# * tlemm# ^ (7 / 3) * (2 - 2.5 * (SIN(fact# * tleincl#)) ^ 2) / (1 - tlee# ^ 2) ^ 2
  430.  
  431. REM   Width of ground track
  432. gtrack# = (360.9856# - ndot#) / (tlemm# + naop# / 360)
  433.  
  434. REM   The following code is applicable in the real world only for
  435. REM   satellites which are in geosynchronous orbit.   Using the TLE the
  436. REM   "sub-satellte longitude is calculated, although of course this is
  437. REM   not applicable to non-GEO orbits.
  438.  
  439. REM   First, calculate the longitude of the Sun for the epoch date
  440. testyear# = (tleyear# - 1956) / 4 - INT((tleyear# - 1956) / 4)
  441.  
  442. SELECT CASE testyear#
  443.    CASE IS = 0
  444.        deltayr# = (tleyear# - 1960) / 4
  445.        lsun0# = 278.679
  446.    CASE IS = .25
  447.        deltayr# = (tleyear# - 1957) / 4
  448.        lsun0# = 279.396
  449.    CASE IS = .5
  450.        deltayr# = (tleyear# - 1958) / 4
  451.        lsun0# = 279.158
  452.    CASE IS = .75
  453.        deltayr# = (tleyear# - 1959) / 4
  454.        lsun0# = 278.918
  455.    CASE ELSE
  456. END SELECT
  457. lsun# = lsun0# + (.0307# * deltayr#) + (.98565# * tlepoch#)
  458.  
  459. REM   Now calculate the GEO sub-satellite longitue.
  460. geolong# = tlenode# + tleaop# + tlema# - 180 - lsun# - 360.98565# * (tlepoch# - INT(tlepoch#))
  461.  
  462. REM   Ensure that the longitude is within the range 0-360 deg
  463. 4010
  464. IF geolong# < 0 THEN geolong# = geolong# + 360: GOTO 4010
  465. 4020
  466. IF geolong# > 360 THEN geolong# = geolong# - 360: GOTO 4020
  467.  
  468. REM   Drift rate arond the GEO orbit.
  469. drift# = 360 * (tlemm# - drift0#)
  470.  
  471. RETURN
  472.  
  473.  
  474. REM----------------------------------------------------------------------------
  475.  
  476.  
  477. 4100
  478. REM   Subroutine which prints basic orbital data to a text file.
  479. REM   Optionss 1 and 1a.   Option 1a differs from Option 1 in that it
  480. REM   allows a more accurate orbital period to be output.
  481.  
  482. IF oldnum <> newnum THEN PRINT #2, gap$
  483. PRINT #2, catnum$;
  484. PRINT #2, "    ";
  485. PRINT #2, tleyear#; month$;
  486. PRINT #2, USING "##.###"; day#;
  487. IF option$ = "1a" THEN GOTO 4110
  488. PRINT #2, "   ";
  489. PRINT #2, USING "###.##"; tleincl#;
  490. PRINT #2, "   ";
  491. PRINT #2, USING "##,###.##"; period#;
  492. PRINT #2, "   ";
  493. GOTO 4120
  494.  
  495. 4110
  496. PRINT #2, "   ";
  497. PRINT #2, USING "###.###"; tleincl#;
  498. PRINT #2, "  ";
  499. PRINT #2, USING "##,###.###"; period#;
  500. PRINT #2, "  ";
  501.  
  502. 4120
  503. PRINT #2, USING "##,###"; perigee#;
  504. PRINT #2, "   ";
  505. PRINT #2, USING "###,###"; apogee#;
  506. PRINT #2, "    ";
  507. PRINT #2, USING "###"; tleaop#
  508. oldnum = newnum
  509.  
  510. RETURN
  511.  
  512.  
  513. REM----------------------------------------------------------------------------
  514.  
  515.  
  516. 4200
  517. REM   Subroutine which prints data to a text file formatted for Lotus 1-2-3.
  518. REM   Option 2.
  519.  
  520. out1$ = catnum$ + " " + tleyear$ + " " + tlepoch$ + "    " + "0" + "    "
  521. PRINT #3, catnum$;
  522. PRINT #3, "   ";
  523. PRINT #3, tleyear$;
  524. PRINT #3, "   ";
  525. PRINT #3, tlepoch$;
  526. PRINT #3, "   ";
  527. PRINT #3, "0";
  528. PRINT #3, "   ";
  529. PRINT #3, USING "###.####"; tleincl#;
  530. PRINT #3, "   ";
  531. PRINT #3, USING "####.#####"; period#;
  532. PRINT #3, "   ";
  533. PRINT #3, USING "#####.####"; perigee#;
  534. PRINT #3, "   ";
  535. PRINT #3, USING "#####.####"; apogee#;
  536. PRINT #3, "   ";
  537. PRINT #3, USING "###.###"; tleaop#
  538.  
  539.  
  540. RETURN
  541.  
  542. REM----------------------------------------------------------------------------
  543.  
  544. 4300
  545. REM   Subroutine which prints data to a text file formatted for Excel.
  546. REM   Option 3.
  547.  
  548. REM out1$ = catnum$ + " " + tleyear$ + "-" + MID$(month$, 1, 3) + "-"
  549. REM out2$ = MID$(STR$(INT(day#)), 2, 2) + " " + STR$(0) + " " + tleincl$ + " "
  550. REM out3$ = period$ + " " + perigee$ + " " + apogee$ + " " + tleaop$
  551. REM out$ = out1$ + out2$ + out3$
  552. REM PRINT #4, out$
  553.  
  554. REM   Excel cannot handle dates properly !   Therefore the tle epoch date/time
  555. REM   must be converted to a decimal of a year.
  556. REM   Check if the year is a leap year: if it is then divide by 366#,
  557. REM   otherwise divide by 365.   Then convert epoch to decimals of a year.
  558. IF ABS(tleyear# / 4# - INT(tleyear# / 4#)) < .01# THEN divday# = 366# ELSE divday# = 365#
  559. decdate# = (tlepoch# - 1) / divday#
  560. decyear# = tleyear# + decdate#
  561.  
  562. PRINT #4, catnum$; "   "; tleyear#; "   ";
  563. PRINT #4, USING "###.########"; tlepoch#;
  564. PRINT #4, "   ";
  565. PRINT #4, USING "####.############"; decyear#;
  566. PRINT #4, "   "; "   ";
  567. PRINT #4, USING "###.####"; tleincl#;
  568. PRINT #4, "   ";
  569. PRINT #4, USING "####.####"; period#;
  570. PRINT #4, "   ";
  571. PRINT #4, USING "#####.####"; perigee#;
  572. PRINT #4, "   ";
  573. PRINT #4, USING "#####.####"; apogee#;
  574. PRINT #4, "   ";
  575. PRINT #4, USING "###.####"; tleaop#
  576.  
  577. RETURN
  578.  
  579. REM----------------------------------------------------------------------------
  580.  
  581.  
  582. 4400
  583. REM   Subroutine which prints data including precession and groundtrack
  584. REM   values to a text file:
  585. REM   Option 4.
  586.  
  587. IF oldnum <> newnum THEN PRINT #5, gap$
  588. PRINT #5, catnum$;
  589. PRINT #5, "      ";
  590. PRINT #5, tleyear#; month$;
  591. PRINT #5, USING "##.###"; day#;
  592. PRINT #5, "  ";
  593. IF option$ = "4a" THEN GOTO 4405
  594. PRINT #5, USING "###.##"; tleincl#;
  595. PRINT #5, "    ";
  596. GOTO 4407
  597. 4405
  598. PRINT #5, USING "###.###"; tleincl#;
  599. PRINT #5, "   ";
  600. 4407
  601. PRINT #5, USING "###.##"; tlenode#;
  602. PRINT #5, "   ";
  603. PRINT #5, USING "###.####"; ndot#;
  604. IF option$ = "4a" THEN GOTO 4410
  605. PRINT #5, "   ";
  606. PRINT #5, USING "####.##"; period#;
  607. GOTO 4420
  608. 4410
  609. PRINT #5, "  ";
  610. PRINT #5, USING "####.###"; period#;
  611. 4420
  612. PRINT #5, "     ";
  613. PRINT #5, USING "#####"; perigee#;
  614. PRINT #5, "   ";
  615. PRINT #5, USING "######"; apogee#;
  616. PRINT #5, "    ";
  617. PRINT #5, USING "###"; tleaop#;
  618. PRINT #5, "   ";
  619. PRINT #5, USING "###.####"; aopdot#;
  620. PRINT #5, "    ";
  621. PRINT #5, USING "###.###"; gtrack#
  622. oldnum = newnum
  623.  
  624. RETURN
  625.  
  626.  
  627. REM----------------------------------------------------------------------------
  628.  
  629.  
  630. 4500
  631. REM   Subroutine which prints data for GEO objects to a text file.
  632. REM   Option 5.
  633.  
  634. IF oldnum <> newnum THEN PRINT #6, gap$
  635. PRINT #6, catnum$;
  636. PRINT #6, "     ";
  637. PRINT #6, tleyear#; month$;
  638. PRINT #6, USING "##.###"; day#;
  639. PRINT #6, "  ";
  640. PRINT #6, USING "###.##"; tleincl#;
  641. PRINT #6, "    ";
  642. PRINT #6, USING "#,###.##"; period#;
  643. PRINT #6, "   ";
  644. PRINT #6, USING "##,###"; perigee#;
  645. PRINT #6, "   ";
  646. PRINT #6, USING "###,###"; apogee#;
  647. PRINT #6, "    ";
  648. PRINT #6, USING "###"; tleaop#;
  649. IF period# < 1200# THEN GOTO 4510
  650. PRINT #6, "     ";
  651. PRINT #6, USING "###.#"; geolong#;
  652. PRINT #6, "   ";
  653. PRINT #6, USING "+##.###"; drift#
  654. oldnum = newnum
  655. GOTO 4520
  656.  
  657. 4510
  658. REM   PRINT #6, ""
  659.  
  660. 4520
  661. RETURN
  662.  
  663.  
  664. REM----------------------------------------------------------------------------
  665.  
  666. 4600
  667. REM   Subroutine which prints data for GEO objects to a text file.
  668. REM   Option 6.
  669.  
  670. IF oldnum <> newnum THEN PRINT #6, gap$
  671. PRINT #6, catnum$;
  672. PRINT #6, "  ";
  673. PRINT #6, tleyear#;
  674. PRINT #6, "  ";
  675. PRINT #6, USING "###.####"; tlepoch#;
  676. PRINT #6, "  ";
  677. decyear# = tleyear# + tlepoch# / 367#
  678. PRINT #6, USING "####.#####"; decyear#;
  679. PRINT #6, "  ";
  680. PRINT #6, USING "###.##"; tleincl#;
  681. PRINT #6, "    ";
  682. PRINT #6, USING "####.##"; period#;
  683. PRINT #6, "   ";
  684. PRINT #6, USING "#####"; perigee#;
  685. PRINT #6, "   ";
  686. PRINT #6, USING "######"; apogee#;
  687. PRINT #6, "    ";
  688. PRINT #6, USING "###"; tleaop#;
  689. IF period# < 1200# THEN GOTO 4510
  690. PRINT #6, "     ";
  691. PRINT #6, USING "###.#"; geolong#;
  692. PRINT #6, "   ";
  693. PRINT #6, USING "+##.###"; drift#
  694. oldnum = newnum
  695. GOTO 4620
  696.  
  697. 4610
  698. REM   PRINT #6, ""
  699.  
  700. 4620
  701. RETURN
  702.  
  703. REM----------------------------------------------------------------------------
  704.  
  705.  
  706. 4700
  707. REM   Subroutine which writes data to a shortened version of the one-line
  708. REM   element set for use in spreadsheets.
  709. REM   Option 6.
  710.  
  711. REM   Extract international designator from the elment set.
  712. ides$ = MID$(tleline1$, 10, 8)
  713.  
  714. outline1$ = "1   " + catnum$ + "   " + ides$ + "   " + tleyear$ + "   "
  715. outline2$ = tlepoch$ + "   " + "   " + tleincl$ + "   " + tlenode$ + "   "
  716. outline3$ = tlee$ + "   " + tleaop$ + "   " + tlema$ + "   " + tlemm$
  717.  
  718. outline$ = outline1$ + outline2$ + outline3$
  719.  
  720. PRINT #4, outline$
  721.  
  722. RETURN
  723.  
  724.  
  725. REM----------------------------------------------------------------------------
  726.  
  727.  
  728. 5000
  729. REM   Subroutine which converts from TLE format epoch to YYYY MMM DD.dd
  730. REM   format.
  731. REM   Test whether a leap year is being dealt with.
  732. diff = INT(tleyear# / 4) - tleyear# / 4
  733. IF diff = 0 THEN GOTO 5010
  734.  
  735. REM   Not a leap year
  736. IF tlepoch# < 32 THEN month$ = "Jan ": month# = 1: day# = tlepoch#: GOTO 5020
  737. IF tlepoch# < 60 THEN month$ = "Feb ": month# = 2: day# = tlepoch# - 31: GOTO 5020
  738. IF tlepoch# < 91 THEN month$ = "Mar ": month# = 3: day# = tlepoch# - 59: GOTO 5020
  739. IF tlepoch# < 121 THEN month$ = "Apr ": month# = 4: day# = tlepoch# - 90: GOTO 5020
  740. IF tlepoch# < 152 THEN month$ = "May ": month# = 5: day# = tlepoch# - 120: GOTO 5020
  741. IF tlepoch# < 182 THEN month$ = "Jun ": month# = 6: day# = tlepoch# - 151: GOTO 5020
  742. IF tlepoch# < 213 THEN month$ = "Jul ": month# = 7: day# = tlepoch# - 181: GOTO 5020
  743. IF tlepoch# < 244 THEN month$ = "Aug ": month# = 8: day# = tlepoch# - 212: GOTO 5020
  744. IF tlepoch# < 274 THEN month$ = "Sep ": month# = 9: day# = tlepoch# - 243: GOTO 5020
  745. IF tlepoch# < 305 THEN month$ = "Oct ": month# = 10: day# = tlepoch# - 273: GOTO 5020
  746. IF tlepoch# < 335 THEN month$ = "Nov ": month# = 11: day# = tlepoch# - 304: GOTO 5020
  747. month$ = "Dec ": month# = 12: day# = tlepoch# - 334: GOTO 5020
  748.  
  749. 5010
  750. REM   Leap year
  751. IF tlepoch# < 32 THEN month$ = "Jan ": month# = 1: day# = tlepoch#: GOTO 5020
  752. IF tlepoch# < 61 THEN month$ = "Feb ": month# = 2: day# = tlepoch# - 31: GOTO 5020
  753. IF tlepoch# < 92 THEN month$ = "Mar ": month# = 3: day# = tlepoch# - 60: GOTO 5020
  754. IF tlepoch# < 122 THEN month$ = "Apr ": month# = 4: day# = tlepoch# - 91: GOTO 5020
  755. IF tlepoch# < 153 THEN month$ = "May ": month# = 5: day# = tlepoch# - 121: GOTO 5020
  756. IF tlepoch# < 183 THEN month$ = "Jun ": month# = 6: day# = tlepoch# - 152: GOTO 5020
  757. IF tlepoch# < 214 THEN month$ = "Jul ": month# = 7: day# = tlepoch# - 182: GOTO 5020
  758. IF tlepoch# < 245 THEN month$ = "Aug ": month# = 8: day# = tlepoch# - 213: GOTO 5020
  759. IF tlepoch# < 275 THEN month$ = "Sep ": month# = 9: day# = tlepoch# - 244: GOTO 5020
  760. IF tlepoch# < 306 THEN month$ = "Oct ": month# = 10: day# = tlepoch# - 274: GOTO 5020
  761. IF tlepoch# < 336 THEN month$ = "Nov ": month# = 11: day# = tlepoch# - 305: GOTO 5020
  762. month$ = "Dec ": month# = 12: day# = tlepoch# - 335
  763.  
  764. 5020
  765. RETURN
  766.  
  767.  
  768. REM----------------------------------------------------------------------------
  769.  
  770.  
  771. 6000
  772. REM   Subroutine which allows the default output drive to be set.
  773.  
  774. IF option$ = "F" THEN drive1$ = drivef1$: drive2$ = drivef2$: GOTO 6010
  775. IF option$ = "C" THEN drive1$ = drivec1$: drive2$ = drivec2$: GOTO 6010
  776. IF option$ = "H" THEN drive1$ = drivec1$: drive2$ = drivec2$: GOTO 6010
  777.  
  778. 6010
  779. LOCATE 2, 63
  780. PRINT drive2$
  781. RETURN
  782.  
  783.  
  784. REM----------------------------------------------------------------------------
  785.  
  786.  
  787. 10000
  788.  
  789. REM   Subroutine which prints the header across the top of the screen.
  790. CLS
  791. LOCATE 1, 12
  792. PRINT "************************         ***********************"
  793. LOCATE 2, 12
  794. PRINT "**  PROGRAM TLEORBIT  **         **  Output Drive:    **"
  795. LOCATE 3, 12
  796. PRINT "************************         ***********************"
  797. LOCATE 2, 63
  798. PRINT drive2$
  799.  
  800. RETURN
  801.  
« Last Edit: August 20, 2018, 12:31:50 pm by odin »

Offline Phil_Clark

  • Newbie
  • Posts: 7
    • View Profile
Re: Problem started with QB64 this morning
« Reply #4 on: August 20, 2018, 11:57:13 am »
One other observation.   I have the same software running on a Windows 10 laptop and that is running normally (as of now): but of course, it is slow.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Problem started with QB64 this morning
« Reply #5 on: August 20, 2018, 12:15:17 pm »
Hi Phil,

Is drive access a common element in the programs not working?

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Problem started with QB64 this morning
« Reply #6 on: August 20, 2018, 12:47:31 pm »
Quick test:  Turn off Anti-virus, Windows Defender, and Firewall...  Compile and see the program then works.

It may be that your antivirus did an update and suddenly decided that the compiled files aren't recognized and is attempting to quarantine/delete/block them as soon as they come into existence.

Personally, I'd disable those things first, rule them out, and then try and see what the issue might be, if they're not the problem.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline TerryRitchie

  • Seasoned Forum Regular
  • Posts: 495
  • Semper Fidelis
    • View Profile
Re: Problem started with QB64 this morning
« Reply #7 on: August 20, 2018, 01:47:04 pm »
Do you have a restore point from yesterday or beyond that you could try? I'm thinking that perhaps an update may have caused this. Your laptop may not have received the update yet. Just a thought.
In order to understand recursion, one must first understand recursion.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Problem started with QB64 this morning
« Reply #8 on: August 20, 2018, 02:20:45 pm »
Windows updates are dated, aren't they, could he check to see if there actually was an update overnight?

And I am wondering, this has not knocked out all his exe's so what is the difference between the ones that are still working and the ones that are not?

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Problem started with QB64 this morning
« Reply #9 on: August 20, 2018, 05:18:13 pm »
I cannot test your program. The "drives.txt" file seems to be missing...

J
Logic is the beginning of wisdom.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Problem started with QB64 this morning
« Reply #10 on: August 20, 2018, 05:52:03 pm »
Phil,

Hmm... No error messages, you say? Can you attempt to run QB64 from a command box ('Start> run cmd" Sorry. Don't know the correct term for Windows) to see if error messages pop up? (just a thought)

You stated, "I have the same software running on a Windows 10 laptop and that is running normally (as of now): but of course, it is slow.". Where all the programs originally compiled on the laptop or the tower?

J
Logic is the beginning of wisdom.

Offline Phil_Clark

  • Newbie
  • Posts: 7
    • View Profile
Re: Problem started with QB64 this morning
« Reply #11 on: August 21, 2018, 05:06:58 am »
I spent most of yesterday (most of 14 hours!) in "chats" with different people at Microsoft, although I feel that for most of the time i was simply being given a complete runaround.   Anyway a "level 2 troubleshooter" using the name Adonis E told me that I was using an old QB64 compiler and that I should download a new one.   So last night I downloaded the latest stable QB64 from https://www.qb64.org/ and that is now on my computer in the "NEWQB64" directory.

This morning I opened the source code for TLEORBIT (which I posted yesterday) in the new QB64 editor and created a new .EXE file: no error messages.   I ran it ........ and once more nothing happened.   I ran the EXE file from the CMD prompt.   There was a slight pause and then a new prompt appeared: the program should have opened and initially prompted me for a file name to process.   No messages appeared on the screen as I ran the EXE file to suggest that there was anything wrong.

So, I am still mystified.   I have also compiled and tried to run another program which wasn't running yesterday: it compiles without any problems but just does nothing when I run it from the CMD prompt.

Of course, I could have been told a load of bull by the Microsoft guy, Adonis E: I certainly got the feeling that he just wanted to get rid of me because he could not sort out what was going wrong, even though he had control of the computer.

When I refer to using the CMD prompt, I have a shortcut on desktop that I call "MSDOS" (it makes sense to me!) which opens a window to run the CMD lines just as if I am using the good ol' MS-DOS.   This morning after compiling, I tried opening the directory using Windows and running the new TLEORBIT.EXE file via that route - same zero response.

Just to clarify for Johnno56 yesterday, I compiled the programs on the laptop when I bought that at the end of 2016 and then when I got the tower computer (where there are the problems - the only onnes with the computer) at the beginning of June this year I installed the QB64 compiler afresh, copied over the .BAS source files and then recompiled those on the tower.   So they were all freshly compiled just over two months ago and they have been running without any problems until yesterday morning.   And yes, I have checked this morning: about half of the compiled files are still running without problems, while others are not running at all.

The file DRIVES.TXT is simply a definition of the three hard drives on my computer and it is:

(Start)
E:\
D:\
G:\
(End)

It means that if drive letters change I have to update just the one file rather than change and recompile each program.   E and D are internal drives, G is an external hard drive for back-up purposes.

I have bad eyesight and my working eye is easily strained, so I need to take a break already today!   I hope that the above comments help or maybe they are just adding to the confusion.   I could try going back to the Microsoft help line but after all of the time yesterday going round in circles my brain isn't ready for that yet. :(

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Problem started with QB64 this morning
« Reply #12 on: August 21, 2018, 09:35:07 am »
I checked my updates log for Windows and learned it does it every night! Not only that, but other things are being updated from HP (the maker of my laptop).

So I am wondering if one of these over night updaters is suddenly requiring administrator like access to different drives? It makes sense for security reasons but old methods of access might no longer work.

A quick experiment to test:
IF _FILEEXISTS(pathedFile$) THEN 'report it's size for checking access
OPEN pathedFile$ FOR BINARY AS #1
PRINT LOF(#1)
CLOSE #1
ELSE
PRINT pathedFile$ " not accessed."
END IF

QB64 does not throw errors if it doesn't get a file access until you try to do something with information from that file.
« Last Edit: August 21, 2018, 09:36:37 am by bplus »

Offline Phil_Clark

  • Newbie
  • Posts: 7
    • View Profile
Re: Problem started with QB64 this morning
« Reply #13 on: August 21, 2018, 10:04:26 am »
The compiler didn't seem to like "LOF(#1)" but "LOF(1)" compiled - but I have never used the function before.

Using this I got the output of the file whose name was assigned to pathedFile$.

By the way, I copied TLEORBIT.BAS to become simply ORBIT.BAS, compiled that - and no, it wasn't running.

Marked as best answer by Phil_Clark on August 21, 2018, 08:33:09 am

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Problem started with QB64 this morning
« Reply #14 on: August 21, 2018, 10:41:24 am »
LOF is Length of File, gives the files size, if it was 0 for an established file then your file access would be broken. I don't use that often either, just read that # sign was optional, maybe not even allowed? anymore.

OK if the pathedFile$ was tested for the different drives you are using, then my theory is wrong.

Thanks for feedback, now my mind is free to try to think other options.
« Last Edit: August 21, 2018, 10:49:32 am by bplus »