Author Topic: [SOLVED] SUB GLB_ON_RESUME  (Read 3543 times)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1620
  • Particle Hawk
    • View Profile
[SOLVED] SUB GLB_ON_RESUME
« on: 2014-Sep-06 »
SUB GLB_ON_RESUME

For windows....doesnt seem to work at all.

I tried adjusting type based variables and GLOBALs, and ran comparisons in the main loop to no effect.
« Last Edit: 2014-Sep-06 by Hemlos »
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

MrTAToad

  • Guest
Re: SUB GLB_ON_RESUME
« Reply #1 on: 2014-Sep-06 »
It doesn't work in debug mode, but does in release mode :

Code: (glbasic) [Select]
GLOBAL a$=""

WHILE TRUE
PRINT "a$="+a$,100,100
SHOWSCREEN
WEND

SUB GLB_ON_RESUME:
a$="glb_on_resume"
ENDSUB

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1620
  • Particle Hawk
    • View Profile
Re: [SOLVED] SUB GLB_ON_RESUME
« Reply #2 on: 2014-Sep-06 »
Thanks nick!
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1620
  • Particle Hawk
    • View Profile
Re: [SOLVED] SUB GLB_ON_RESUME
« Reply #3 on: 2014-Sep-07 »
oh by the way...i was using a float not a string
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

MrTAToad

  • Guest
Re: [SOLVED] SUB GLB_ON_RESUME
« Reply #4 on: 2014-Sep-07 »
I used a string to show it worked :)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1620
  • Particle Hawk
    • View Profile
Re: [SOLVED] SUB GLB_ON_RESUME
« Reply #5 on: 2014-Sep-08 »
yea but numbers are more useful, did you try that?
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

MrTAToad

  • Guest
Re: [SOLVED] SUB GLB_ON_RESUME
« Reply #6 on: 2014-Sep-08 »
Something like :

Code: (glbasic) [Select]
LOCAL x%,y%

GETDESKTOPSIZE x%,y%
GLOBAL onResume%=TRUE
LOCAL text$

WHILE TRUE
text$="Program paused : "
IF onResume%
INC text$,"No"
ELSE
INC text$,"Yes"
ENDIF

PRINT text$+" ("+onResume%+")",0,0
SHOWSCREEN
WEND

SUB GLB_ON_RESUME:
onResume%=TRUE
ENDSUB

SUB GLB_ON_PAUSE:
onResume%=FALSE
ENDSUB