Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6076259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:35:13+00:00 2026-05-23T10:35:13+00:00

If I try the following code: call/wait/output {webrequest http://google.com login password} content REBOL complains

  • 0

If I try the following code:

call/wait/output {webrequest http://google.com login password} content

REBOL complains with an error. Instead, I have to use the following:

content: ""
call/wait/output {webrequest http://google.com login password} content

Why?

Update: I thought answer would be simple …

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:35:14+00:00Added an answer on May 23, 2026 at 10:35 am

    “Why?” is a tricky question! I’ll try and give a rationale…

    When passing back a value from a function that is supposed to gather data and hand it back, there are two basic options (in most languages).

    One is to use it as the return. (In languages like Rebol and Ruby, the implicit return is what the last statement in a code block evaluates to.) The other way to hand back data is to poke it into a parameter which the caller has passed “by reference” or “by pointer”.

    Current design of call is that it returns the exit code of the process. But let us imagine an alternate universe where the refinement to call of /output changed the return value, it might look like this:

    >> call {echo "test"}
    == 0
    
    >> call/output {echo "test"}
    == [0 "test"] ; in an alternate universe...
    

    The design choice was not to do this. call always returns the simple exit code. Instead, if you care about the /output of a call, you pass a parameter by reference…into which Rebol will write the console results.

    It’s very flexible, because Rebol lets you (for instance) pass in a parameter which is an open file to write the results…as opposed to making you store a function return that might be very large and then writing it out. Whether call should be writing to a file or putting the results in a string is cued by the data type of the “by reference” parameter.

    In short, this is a design decision of the language. Rather than making an assumption about where the output should go, Rebol “sniffs” the parameter type and does the appropriate thing. If you haven’t established a data type for content…it can’t work. Again if we consider an “alternate universe”, it would be possible for call to have different refinements:

    call/outputstring {echo "test"} content
    

    And then it wouldn’t have to worry about whether content was previously declared, call would assume it’s supposed to turn content into a string. If you were writing to a file, it could create it for you…like this:

    call/outputfile {echo "test"} %/myfile.txt content
    

    But that wouldn’t let you write into an arbitrary location of an already-existing file, or a position in an existing string. Simply put, requiring content to be previously declared finesses this. But as you’ve noticed, it takes a little more code. You could, if you wished, put the declaration inline:

    call/output {echo "test"} content: {}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got a little problem. Sometimes, when I try to call the following code,
I try to use the following code: ArrayList<String> Map<String, String> Eclipse complains about both
For some reason the following code causes a SIGSEGV when I try to call
In the following code, I call JOptionPane.showMessageDialog, inside a try/catch block. But when the
Try the following code public enum Color { Blue=1, Red=2, Green=3 } public List<Color>
Try the following code: s = '#value#' puts s.gsub('#value#', Regexp.escape('*')) # => '\*' puts
I try the following code, but it doesn't work. [helloToolbar setBackgroundColor:[UIColor clearColor]];
We have following code: try { // some code throwing MyException } catch (MyException
If I try executing the following code f = file('test','rb') fout = file('test.out','wb') for
I use the following code try to create an array of string vectors, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.