home *** CD-ROM | disk | FTP | other *** search
- /* edit_xyv_alle.rexx
- *
- * Autor: Thies Wellpott
- * Version: 1.1 (2.7.1994)
- *
- * Addiert bei allen Objekten zur x- und y-Koordinate und zur x- und
- * y-Geschwindigkeit einen einzugebenden Betrag
- */
-
- IF ~Show("P", "GRAVISIMU.1") THEN
- DO
- Say "GraviSimu ist nicht gestartet!"
- Exit
- END /* IF */
-
- Address "GRAVISIMU.1"
- Options Results
-
- 'GetNumObjects'
- anz_obj = Result
- IF anz_obj = 0 THEN
- DO
- Say "Es existieren keine Objekte!"
- Exit
- END
-
- Options Prompt ">> "
-
- Say "Additionswert für die x-Koordinate (Kommazahl Leerzeichen"
- Say "Streckeneinheitsabkürzung)"
- Parse Pull ax ax_einh
- 'GetUnitM' ax_einh
- IF RC ~= 0 THEN
- DO
- Say "Ungültige Streckeneinheit!"
- Exit
- END
- ax = ax*Result
-
- Say "Additionswert für die y-Koordinate (Kommazahl Leerzeichen"
- Say "Streckeneinheitsabkürzung)"
- Parse Pull ay ay_einh
- 'GetUnitM' ay_einh
- IF RC ~= 0 THEN
- DO
- Say "Ungültige Streckeneinheit!"
- Exit
- END
- ay = ay*Result
-
- Say "Additionswert für die x-Geschwindigkeit (Kommazahl Leerzeichen"
- Say "Geschwindigkeitseinheitsabkürzung)"
- Parse Pull avx avx_einh
- 'GetUnitMS' avx_einh
- IF RC ~= 0 THEN
- DO
- Say "Ungültige Streckeneinheit!"
- Exit
- END
- avx = avx*Result
-
- Say "Additionswert für die y-Geschwindigkeit (Kommazahl Leerzeichen"
- Say "Geschwindigkeitseinheitsabkürzung)"
- Parse Pull avy avy_einh
- 'GetUnitMS' avy_einh
- IF RC ~= 0 THEN
- DO
- Say "Ungültige Streckeneinheit!"
- Exit
- END
- avy = avy*Result
-
- 'ObjectList Quiet'
- Say "Addiere..."
- DO FOR anz_obj
- 'GetObject 0'
- Parse Var Result '"' name '"' m m_einh x y xy_einh vx vy v_einh rest
- 'GetUnitM' xy_einh
- m_p_xy = Result
- 'GetUnitMS' v_einh
- ms_p_v = Result
-
- 'DeleteObject 0'
-
- x = x + ax/m_p_xy
- y = y + ay/m_p_xy
- vx = vx + avx/ms_p_v
- vy = vy + avy/ms_p_v
-
- 'NewObject "'name'"' m m_einh x y xy_einh vx vy v_einh rest
- END /* FOR i */
- 'ObjectList NoQuiet'
-
- Exit
-
-