Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Javascript zu vc++

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe ein Javascript zur umrechnung von einer Einheit unter bezugnahme der Temperatur zu einer anderen Einheit.

Da die Berechnung sehr kompliziert ist finde ich dazu keine normalen Berechnungsformeln die ich in c++ nutzen könnte. Daher muss das Script irgendwie für Visual C++ Forms angepasst werden nur weiß ich nicht wie.

Helft Ihr mir dabei?

Dankeschonmal vorab!

LG Matze

Hier noch die Javascript Funktion die ich für C++ brauche

function salinitaet(form) {

var temps=parseFloat(form.temps.value);

var denss=parseFloat(form.denss.value);

denss= denss-999.96;

var limit = 10000;

var salmin = 0.0;

var salmax = 100.0;

var fehler = 1.0;

var densNeu;

var i = 0;

while( (Math.abs(fehler) > 0.00001) && (i < limit) ) {

sals = (salmin+salmax) / 2.0;

densNeu = - 0.157406 + temps*(6.793952E-2 - temps*(9.095290E-3 - temps*(1.001685E-4 - temps*(1.120083E-6 - temps *6.536332E-9)))) + sals*(8.24493E-1 - temps*(4.0899E-3 - temps*(7.6438E-5 - temps*(8.2467E-7 - temps*5.3875E-9))) - Math.sqrt(sals)*(5.72466E-3 - temps*(1.0227E-4 - temps*1.6546E-6)) + sals*4.8314E-4);

fehler = (densNeu-denss) / denss;

if (fehler > 0.0)

salmax = sals;

else

salmin = sals;

++i;

}

if ( i >= limit )

form.sals.value= "ERROR";

else

form.sals.value= "Salinität = "+Math.round(100*sals)/100+" psu";

}

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.