Go Back   FlashFXP Forums > Community Chatter > Programming

Programming Need help with C/C++/Delphi? Ask here and make us all laugh.

Closed Thread
 
Thread Tools Rate Thread
Old 08-28-2004, 12:16 PM   #1
Member
FlashFXP Registered User
ioFTPD Registered User
 
Join Date: Mar 2003
Posts: 89
Default Get Return Code C++ in TCL

I have an C++ code was return value for different error.

int main(int argc, char * argv[]) {

error 1 -> return 1 or exit(1);
error 2 -> return 2 or exit(2);
...
}

Question -> How can i get in TCL when I execute the exe file, the return value.

set status [catch {exec ..... } result ] return only if the fonction was successfull execute.

Any idea ? Thanks
biboun is offline  
Old 08-30-2004, 03:21 AM   #2
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 558
Default

set status [exec - blahblah...] will set the return code tho.
FTPServerTools is offline  
Old 08-30-2004, 04:45 AM   #3
Senior Member
FlashFXP Registered User
ioFTPD Scripter
 
Join Date: Jan 2003
Posts: 288
Default

catch {set status [exec ....]} status

should also return any errors or your return code to $status
__________________
#iotools #ioftpd (both on efnet)
tuff is offline  
Old 09-01-2004, 04:23 PM   #4
Member
FlashFXP Registered User
ioFTPD Registered User
 
Join Date: Mar 2003
Posts: 89
Default ok

Tks for your answers. It works fine.
biboun is offline  
Closed Thread
Create a free account to browse our forums without ads



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Congratulations Jesper General Discussions 0 07-31-2004 07:11 AM


All times are GMT -5. The time now is 12:45 PM.