Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: still a rookie

From: johnkenyon:ibm at: 11-Dec-2000 16:44

Hi Giovanni, Confusing to start with :) I would recommend making regular use of the built-in help function.
>> myname: [giovanni cardona iguina] >> uno: 1 >> myname: skip myname -uno <-doesnt work >> myname: skip myname -1 <-it works. but I want this on a variable >> help -
USAGE: value1 - value2 DESCRIPTION: Returns the second value subtracted from the first. - is an op value. ARGUMENTS: value1 -- (Type: number pair char money date time tuple) value2 -- (Type: number pair char money date time tuple) -- so try :
>> myname: skip myname (- uno)
or
>> myname: skip myname negate uno
Example 2;
>> LE: length? myname >> print myname/LE <-doesnt work >> print myname/3 <-this path works, but I want this on a variable
try :
>> print myname/:LE
Also I noticed that if I set myname to the last value: Exactly
>> ? last
USAGE: LAST series DESCRIPTION: Returns the last value of a series. LAST is an action value. ARGUMENTS: series -- (Type: series port tuple) --
>> myname: last myname
This has set myname to the last _value_ in the series Try tail:
>> ? tail
USAGE: TAIL series DESCRIPTION: Returns the series at the position after the last value. TAIL is an action value. ARGUMENTS: series -- (Type: series port) -- myname: tail myname and then insert a new name:
>> insert myname 'bonano
== []
>> myname: head myname
== [giovanni cardona iguina bonano] Hope this helps a little. Regards, John