Matrix Elements VB-800 Manuel d'utilisateur Page 22

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 172
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 21
14 Appendix A1 Extending Ox
symbol defines it as having three constant arguments. The implementation is
listed below.
OxMain compiles the code and returns a value > 1 when successful. That value
is stored in iMainIP and used in subsequent calls to specific Ox functions.
When RanApp is run, and ranapp.ox compiled successfully, the Generate but-
ton lights up. Then, when Generate is pressed, the OnGenerate function from
ranapp.ox (given below) is called, and the Draw and Variance buttons become
active. These buttons also lead to a call to underlying Ox code. The C
++
calls
are:
....................................ox/dev/windows/ranapp/RanAppDlg.c (part of)
static BOOL callOxFunction(char *sFunction)
{
BOOL ret_val = FALSE;
TRY
{
FOxRun(g_iMainIP, sFunction);
ret_val = TRUE;
}
CATCH_ALL(e)
{
}
END_CATCH_ALL
return ret_val;
}
void CRanAppDlg::OnDimension()
{
callOxFunction("OnDimension");
}
void CRanAppDlg::OnGenerate()
{
m_variance.EnableWindow();
m_draw.EnableWindow();
callOxFunction("OnGenerate");
}
void CRanAppDlg::OnDraw()
{
callOxFunction("OnDraw");
}
void CRanAppDlg::OnVariance()
{
callOxFunction("OnVariance");
}
.......................................................................................
Below is a listing of ranapp.ox, the program behind this application. It is a simple
Ox program which draws random numbers in OnGenerate, prints their variance matrix
in OnVariance, and draws the correlogram and spectrum in OnDraw.
Vue de la page 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 171 172

Commentaires sur ces manuels

Pas de commentaire