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


GetLastJob

Returns the latest job sent to Scilab engine

BOOL GetLastJob(char *JOB,int nbcharsJOB);

Description

This fonction returns the latest job sent to Scilab engine with the command SendScilabJob or SendScilabJobs. This can be used to display a command which failed.

BOOL is just a simple typedef on int (typedef int BOOL ). TRUE is defined on 1 (#define TRUE 1) and FALSE is defined on 0 (#define FALSE 0).

Arguments

JOB

a standard C char* which will be filled with the latest job

nbcharsJOB

The number of char of JOB

returns

1 (TRUE) if the operation is successful.

0 (FALSE) if an error during initialization occurred.

Examples

// A simple GetLastJob example
// See SCI/modules/call_scilab/examples/basicExamples/GetLastJob.c for
// the full code
int code=SendScilabJob("failedMyCurrentJob=%pi*3/0");
if (code!=0){
 char lastjob[4096];
 if (GetLastJob(lastjob,4096))  {
  printf("Failed command: %s\n",lastjob);
 }
}

See also

  • Call_Scilab — call_scilabは, C/C++コードからScilabエンジンをコールする機能を提供する インターフェイスです.
  • Compile and run with call_scilab — How to compile a native application based on or using Scilab
  • SendScilabJob — Send a Scilab task from a C/C++ code (call_scilab)
  • TerminateScilab — Stops and terminates Scilab engine in Call Scilab
Report an issue
<< fromjava call_scilab API ScilabHaveAGraph >>

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:
Mon Jun 17 17:54:24 CEST 2024