Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Java from Scilab > jautoUnwrap

jautoUnwrap

Unwrap automatically returned values

Calling Sequence

autoUnwrap = jautoUnwrap()
jautoUnwrap(autoUnwrap)

Parameters

autoUnwrap

A boolean

Description

If autoUnwrap is true, all the values returned by a method invocation are unwrapped if it is possible.

This strongly simplifies the usage of the Java / Scilab conversions.

By default, autoUnwrap is true.

Examples

jautoUnwrap(%f);
jautoUnwrap()
jautoUnwrap(%t);
// In this example, without disabling the auto unwrap, Scilab will try to
// convert the result of currentTimeMillis to a long (which is not yet
// supported in Scilab)
// Without the auto unwrap, Scilab will keep a reference to the object

               jautoUnwrap(%f)
               jimport java.util.Date;
               jimport java.lang.System;

               t = System.currentTimeMillis();
               s = jnewInstance(Date, t);
               str = jnewInstance("java.lang.String", "Hello");
               d = s.toString()

               jremove Date System t s str;
               jautoUnwrap(%t)

See Also

  • jinvoke — Invoke a method of a Java object

History

バージョン記述
5.5.0 Function introduced. Based on the 'JIMS' module. The main difference in the behavior compared to the JIMS module is that jautoUnwrap is enabled by default.
Report an issue
<< jautoTranspose Java from Scilab jcast >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Apr 11 14:19:09 CEST 2014