Zdravím,
asi tak to zhruba mám, mimo jiné je na začátku:
Global WA(12) As Double, XA(12) As Double, YA(12) As Double, ZA(12) As Double, MA(12) As Double
pole inicializuji takto:
Sub Main
WA = Array(0, 0.035646608082654, 0.016000404490225, 0.015500439437458, 0.010315267586293, _
0.010105137896732, 0.010315267586293, 0.0041883679973837, 0.0032504786329787, _
0.0076109906967816, 0.0060458168932457, 0.0074959810297708, 0.012420246492211)
XA = Array(0, 0.0, 0.016000404490225, 0.0, 0.020630535172586, 0.010105137896732, _
0.020630535172586, 0.016753471989535, 0.019502871797872, 0.022832972090344, _
0.024183267572982, 0.014991962059541, 0.012420246492211)
YA = Array(0, 0.0 ,0.016000404490225, 0.015500439437458, 0.041261070345173, _
0.020210275793465, 0.041261070345173, 0.025130207984302, 0.026003829063829, _
0.022832972090344, 0.018137450679737, 0.022487943089312, 0.012420246492211)
ZA = Array(0, 0.0, 0.016000404490225, 0.0, 0.020630535172586, 0.010105137896732, _
0.020630535172586, 0.016753471989535, 0.019502871797872, 0.022832972090344, _
0.012091633786491, 0.014991962059541, 0.0)
MA = Array(0, 28.05316, 62.49842, 64.5143, 96.94368, 98.95956, 96.94368, 119.37824, _
153.8235, 131.38894, 165.40362, 133.40482, 80.5137)
End Sub
a v důležitých funkcích mám na začátku toto:
If MA(1)<>28.05316 Then Call Main
takže lepší způsob asi není...
a teď jak to udělat, aby se mi subrutina Main spustila automaticky při nahrání programu? Jde to?
Ubuntu 22.04.4 LTS, LibreOffice Verze: 7.6.6.3, wxMaxima 20.12.1, Maxima 5.47.0 (SBCL)