diff --git a/documentation/current/method/_images/VoidSafeAddLibraryDialog_noGobo.png b/documentation/current/method/_images/VoidSafeAddLibraryDialog_noGobo.png new file mode 100644 index 00000000..edbba2fc Binary files /dev/null and b/documentation/current/method/_images/VoidSafeAddLibraryDialog_noGobo.png differ diff --git a/documentation/current/method/_images/VoidSafeAddLibraryDialog_noGobo.png.data b/documentation/current/method/_images/VoidSafeAddLibraryDialog_noGobo.png.data new file mode 100644 index 00000000..4807a799 --- /dev/null +++ b/documentation/current/method/_images/VoidSafeAddLibraryDialog_noGobo.png.data @@ -0,0 +1,3 @@ +title=VoidSafeAddLibraryDialog +author=halw +path=content/voidsafeaddlibrarydialog diff --git a/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-implementation.wiki b/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-implementation.wiki index 0b9f7621..81c3da28 100644 --- a/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-implementation.wiki +++ b/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-implementation.wiki @@ -76,57 +76,22 @@ and you want to output that string using io.put_string. The solutio But the statement above results in a compile error because the argument type (separate STRING) is not compatible with the type (STRING) that put_string is expecting. -Possible workarounds are to produce a non-separate version of the string which would be printable, or to print the string character-by-character. Both involve looping through the string. +In order to make printing of the content of separate instances of STRING, a creation procedure, make_from_separate, is available in the string classes which allows initialization of a non-separate instance of STRING from a separate STRING. -To construct equivalent objects of type STRING from those of type separate STRING, you could write a function: +So, to print my_separate_string, you could create a non-separate instance of STRING, then print the non-separate instance, as shown below. - non_separate_string (a_sep_str: separate STRING): STRING - -- Non-separate copy of `a_sep_str' - local - i: INTEGER - do - create Result.make_empty - from - i := 1 - until - i > a_sep_str.count - loop - Result.append_character (a_sep_str [i]) - i := i + 1 - end - end + local + l_temp: STRING + ... + create l_temp.make_from_separate (my_separate_string) + io.put_string (l_temp) -Then you could print my_separate_string this way: +Or use a creation expression and avoid declaring the local variable: - io.put_string (non_separate_string (my_separate_string)) - - -The other alternate is to create a procedure that will print an object of type separate STRING: - - - print_separate_string (a_sep_str: separate STRING) - -- Print `a_sep_str' on standard output. - local - i: INTEGER - do - from - i := 1 - until - i > a_sep_str.count - loop - io.put_character (a_sep_str [i]) - i := i + 1 - end - end - - -Then you could use that procedure to output my_separate_string: - - - print_separate_string (my_separate_string) + io.put_string (create {STRING}.make_from_separate (l_temp)) @@ -142,4 +107,3 @@ In the EiffelStudio implementation, a routine will not necessarily wait for all -