Re: Come verificare se è impostata una preferenza e comeIl valore restituito è un comando per impostare le preferenze così come sono Sono al momento.
Puoi convertire il comando in una stringa, analizzarlo e verificare se l'opzione è abilitata o disabilitata:
returnedString=Char(Get Platform Preference( Control chart builder( K sigma ) ));
Regex(returnedString,"(on|off)","\1")
Re: Come verificare se è impostata una preferenza e comeGrazie @hogi , che ha funzionato perfettamente. Ero irritato, perché ho assegnato il comando preferenza a una variabile e quindi il cast al carattere non ha funzionato. Ma è la magia di JSL.
returnedCommand = Get Platform Preference( Control chart builder( K sigma ) );
// this gives nothing:
show(char(returnedCommand));
returnedString=Char(Get Platform Preference( Control chart builder( K sigma ) ));
// this works
show (returnedString);
Re: Come verificare se è impostata una preferenza e comeNon potresti controllare anche il letterale come espressione?
Names default to here(1);
Get Platform Preference( Control chart builder( K sigma ) ) == Expr(Platform Preferences( Control chart builder( K Sigma( 3, <<OFF></OFF>
Come verificare se una preferenza è impostata e comeVorrei verificare se una preferenza è impostata su un determinato valore, ma con JSL non riesco a recuperare il valore per confrontarlo in un'istruzione if ecc. E reagire alla situazione. Get Preferences restituisce qualcosa, ma cos'è esattamente e come procedere?
Names Default To Here( 1 );
// Task: what is the preference set to
prefs = Get Platform Preference( Control chart builder( K sigma ) );
// hover over prefs shows the result correctly, but how to retrieve it,
// e.g. as a string?
// what type is this? JMP gives no answer
Type( prefs );
// it has a length
length(prefs);
// this does not work
Log Capture( Get Platform Preference( Control chart builder( K sigma ) ) );
Modellazione statistica avanzataAutomazione e scriptingConsumatori e ricerche di mercatoPersonalizzazione di massa