Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: how to get parameter file if refinement is /file
Pages: [1] Print
Author Topic: how to get parameter file if refinement is /file  (Read 242 times)
howto
Guest


Email
how to get parameter file if refinement is /file
« on: October 31, 2005, 03:56:32 PM »

when refinement and arg has the same name how to get the parameter ?

f: func[/file file][if file [print self/file]]

self doesn't work with function:

>> f: func[/file file][if file [print self/file]]
>> f/file %hello.txt
** Script Error: self has no value
** Where: f
** Near: print self/file
>>


 
Logged
CarlRead
Full Member
***
Offline Offline

Posts: 105


View Profile
how to get parameter file if refinement is /file
« Reply #1 on: October 31, 2005, 11:23:54 PM »

In View 1.3, trying to create such a function causes an error...

>> f: func[/file file][if file [print self/file]]
** Script Error: Duplicate function value: file
** Where: throw-on-error
** Near: func [/file file] [if file [print self/file]]

You don't get the error in View 1.2, so I assume that or an earlier Core is what you're using?

Anyway, I guess the answer is DON'T DO THAT! ;-)
« Last Edit: October 31, 2005, 11:24:42 PM by CarlRead » Logged

- Carl Read
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: how to get parameter file if refinement is /file
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 03, 2008, 10:25:07 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2315 Posts in 597 Topics by 4205 Members
Latest Member: TimTearton

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc