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

Script Error: get_func_name has no value

 [1/6] from: richard:coffre:francetelecom at: 12-Apr-2002 15:21


Hi, I have the following code : REBOL[] get_func_name:make function! [chaine] [ guillemet: make string! {"} remove/part chaine 6 foo: copy/part chaine 1 1 if foo == guillemet [ remove/part chaine 1 ] ;supprimer les 2 derniers caract=E8res clear skip tail chaine -2 return chaine ] test:{"123456fonction rearzer r r12"} print get_func_name [ test ] When I run it, it raised the error : ** Script Error: get_func_name has no value ** Near: print get_func_name [test] TIA Richard Coffre France Telecom Orbiscom T=E9l. : 01 47 61 46 28

 [2/6] from: anton:lexicon at: 13-Apr-2002 0:58


The problem is that there is a space missing in your first set-word. You need to do this: get_func_name: make ... ^ (a space) See this console session:
>> f:make function! [][] ; a function that does nothing...
== []
>> f
** Script Error: f has no value ** Near: f
>> f: make function! [][] >> f >> <--- notice no error...
Anton.

 [3/6] from: rotenca:telvia:it at: 12-Apr-2002 17:26


Hi, coffre get_func_name:make function! [chaine] put a space between get_func_name: make function! [chaine] --- Ciao Romano ----- Original Message ----- From: "COFFRE Richard FTO" <[richard--coffre--francetelecom--com]> To: <[rebol-list--rebol--com]> Sent: Friday, April 12, 2002 3:21 PM Subject: [REBOL] Script Error: get_func_name has no value Hi, I have the following code : REBOL[] get_func_name:make function! [chaine] [ guillemet: make string! {"} remove/part chaine 6 foo: copy/part chaine 1 1 if foo == guillemet [ remove/part chaine 1 ] ;supprimer les 2 derniers caractères clear skip tail chaine -2 return chaine ] test:{"123456fonction rearzer r r12"} print get_func_name [ test ] When I run it, it raised the error : ** Script Error: get_func_name has no value ** Near: print get_func_name [test] TIA Richard Coffre France Telecom Orbiscom Tél. : 01 47 61 46 28

 [4/6] from: joel:neely:fedex at: 12-Apr-2002 10:55


Hi, Richard, You need at least one space after the concluding colon in a SET-WORD! value (unless there's another syntactic cue, such as the beginning of a block or string). See below... COFFRE Richard FTO wrote:
> Hi, > > I have the following code : > > REBOL[] > get_func_name:make function! [chaine]
That line must read: get_func_name: make function! [chaine]
> [ > guillemet: make string! {"}
<<quoted lines omitted: 9>>
> ] > test:{"123456fonction rearzer r r12"}
That line really should read test: {"123456fonction rearzer r r12"} although the space isn't mandatory because of the opening brace for the string. Getting in the habit of inserting spaces will: - make your code easier to read - keep your fingers from leaving out non-optional spaces -jn-

 [5/6] from: greggirwin::mindspring::com at: 12-Apr-2002 11:27


Hi Richard, << get_func_name:make function! [chaine] >> Make sure you have a space after the colon. --Gregg

 [6/6] from: richard:coffre:francetelecom at: 15-Apr-2002 10:06


Thanks Anton, Romano, Joel and Gregg. -----Message d'origine----- De : Gregg Irwin [mailto:[greggirwin--mindspring--com]] Envoy=E9 : vendredi 12 avril 2002 19:27 =C0 : [rebol-list--rebol--com] Objet : [REBOL] Re: Script Error: get_func_name has no value Hi Richard, << get_func_name:make function! [chaine] >> Make sure you have a space after the colon. --Gregg

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted