Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
2 votes
2 answers
222 views

I have an arbitrary function with multiple arguments, and I want to call it from command-line like this: program myfun 7 24 15 I tried to do it this way: myfun Func: [A B C][...] ARGS: Probe System/...
Slavko's user avatar
  • 27
0 votes
1 answer
113 views

I have 2 files: list-folder1.txt and list-folder2.txt. These files are derived from the ls -1R command run on linux in their respective folders (similar folders consisting of thousands of files and ...
noein's user avatar
  • 421
1 vote
1 answer
170 views

Does anyone know how to use view from Rust? Do I need to link libRed.dll on Windows? What functions to extern? Must I try to disassemble it? I’m using compiled Red, not interpreted, so libRedRT.lib ...
Miiao's user avatar
  • 1,054
0 votes
1 answer
151 views

I've been exploring the amazing Rebol programming tool. I've run into a problem of trying to append text from a text field into the data of a text-list. My code below adds text to the text-list but ...
awyr_agored's user avatar
0 votes
1 answer
2k views

I am looking for decompressing data according to the deflate compression mechanism [rfc1951]. The linux command for this mechanism is: zlib-flate -uncompress I try the Red command decompress with ...
user16861490's user avatar
0 votes
1 answer
130 views

On Red console, I tried the following commands: >> (print 0 call/shell/wait "sleep 5" print 5) I think 0 would be printed first. After 5 seconds delay, 5 would then be printed. In ...
lyl's user avatar
  • 293
1 vote
2 answers
166 views

>> f: func [x /a][either a [x + 2] [x + 1]] == func [x /a][either a [x + 2] [x + 1]] >> b: /a == /a >> f/b 1 *** Script Error: f has no refinement called b *** Where: f *** Stack: ...
lyl's user avatar
  • 293
1 vote
1 answer
118 views

I put some functions' defination in a file named "funcs.red", functions in which would be invoked by main program. Here is the example of "funcs.red": Red [] myadd: func [x y] [x + ...
lyl's user avatar
  • 293
0 votes
2 answers
170 views

To make a function with default argument, I tried this: f: function [a b] [either unset? :b [a + 1] [a + b]] f 5 f 3 5 then I receive this message *** Script Error: f is missing its b argument. So, ...
lyl's user avatar
  • 293
2 votes
1 answer
231 views

We can get input from console by input or ask, which means to press some keys on keyboard and terminate the input by pressing the key "Enter". I'd like to know if there is a way to get a key ...
lyl's user avatar
  • 293
0 votes
2 answers
108 views

I construct a function named find-all to find all indexes of a given item in a series by "recursive". The first calling of find-all gives the right output. However from the second calling, ...
lyl's user avatar
  • 293
1 vote
1 answer
74 views

I imitate the follow code that comes from Helpin'Red a: "big black cat" parse a [ to "black" insert "FAT "] print a big FAT black cat with mine: b: [1 2 3] parse b [to 2 ...
lyl's user avatar
  • 293
1 vote
1 answer
168 views

I want to split a string with the split, meanwhile the string contains the string used as delimiter which should not be treated as delimiter. I tried in this way as shown in the following code: >&...
lyl's user avatar
  • 293
0 votes
3 answers
214 views

I want to modify each element of a block by foreach. I tried like this but failed: >> a: [3 4 5 6] == [3 4 5 6] >> foreach i a [i + 1] == 7 >> a == [3 4 5 6] ;; block a is not ...
lyl's user avatar
  • 293
2 votes
1 answer
209 views

I'm puzzled by the result of the following two codes: Code1: >> f: func [x][head insert x 1] == func [x][head insert x 1] >> a: [2 3] == [2 3] >> f a == [1 2 3] >> a == [1 2 3] ...
lyl's user avatar
  • 293

15 30 50 per page
1
2 3 4 5
17