This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Ftp Online

Old posts that have not been replied to for several years.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: FTP Online

Post by user »

CyberGhosT wrote:cant some1 make a tcl script like this 1 without the package require ftp ?
Sure...replace "package require ftp" with "source /path/to/ftp.tcl" :mrgreen:
Have you ever read "The Manual"?
C
CyberGhosT
Voice
Posts: 13
Joined: Thu Nov 20, 2003 5:19 pm

FTP Online

Post by CyberGhosT »

i cant seam to find out how to use package require ftp
can some one give me some hints :o
CyberGhosT
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Hint 1: Go to tcllib.sf.net to download and install tcllib.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

Sir_Fz wrote: if {$ftp<0} {
lappend out "$name is down"
} {
lappend out "$name is up"
}
Just curious not saying its wrong but doesn't there need to be else or something in between could be wrong never seen it used like this tho ..
XplaiN but think of me as stupid
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Ofloo wrote:Just curious not saying its wrong but doesn't there need to be else or something in between could be wrong never seen it used like this tho ..
http://tcl.tk/man/tcl8.4/TclCmd/if.htm
Have you ever read "The Manual"?
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

no still no clue i do understand the concept of if

Code: Select all

if {... condition ...} {
  ... body ...
} elseif {... condition ...} {
  ... body ...
} else {
  ... body ...
}
that is what i understand from the manual

but i have never seen this is it the same as else ..

Code: Select all

if {... condition ...}{
  ... body ...
}{
  ... body ...
}
XplaiN but think of me as stupid
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Ofloo wrote:i have never seen this is it the same as else ..

Code: Select all

if {... condition ...}{
  ... body ...
}{
  ... body ...
}
Probably because "}{" would make the parser return an error :P it's "} {"
If you'd read the whole manual page for 'if' you'd see.
The then and else arguments are optional ``noise words'' to make the command easier to read.
If you like being verbose i recommend using "then" too! :P
Have you ever read "The Manual"?
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

ic ic hmm

so in a way i could do

Code: Select all

if {  ... condition ... } then {
  ... body ...
} else {
  ... body ...
}
hmm ive used some php before and they had something simular ..

if {}
then string ..

does this apply on tcl as well ?? if there is no {} then only the first string after the condition is included to the if condition ..
XplaiN but think of me as stupid
Locked