Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
56 views

Error: Non-compatible actual argument in a feature call in Eiffel code for reading and writing files

I am working on a program in Eiffel that reads data from an input file, processes it, and writes the results to an output file. The input file contains: ID, name, birthdate, address, and the number of ...
Amira_AJ's user avatar
0 votes
1 answer
67 views

Writing a project in EiffelStudio that simulates a dice roll

I am attempting to simulate a dice roll using the RANDOM class in the BASE library. With my current code, it only ever prints out 5. class APPLICATION create make feature make ...
Dirtjersey6's user avatar
1 vote
1 answer
68 views

why here 'or' follows with an 'else', what kind of branches do they make?

I saw a really confusing statement when I read OMOHUNDRO's article about balltree construction algorithms: --... if pq.empty or else btm.bvol <= pq.top.bvol then done:=true --... I don't know how ...
SZYoo's user avatar
  • 431
1 vote
1 answer
86 views

How to use convert for creation

Using "Void safety - complete", my code: class TENSOR_SHAPE create default_create, from_tuple convert from_tuple ({TUPLE [INTEGER]}) feature -- Initialization from_tuple (...
jjj's user avatar
  • 23
1 vote
2 answers
115 views

How to print unicode to console in Eiffel?

Evidently in python: print u'\u0420\u043e\u0441\u0441\u0438\u044f' outputs: Россия How do I do this in Eiffel?
jjj's user avatar
  • 23
0 votes
0 answers
98 views

Why does my Cecil / Eiffel code not find the 'apply' procedure in class PROCEDURE?

I want a C routine, which is supplied with an Eiffel 'agent' to call the routine 'apply' in the class PROCEDURE. int c_nng_aio_set_procedure_target(void *item, EIF_OBJECT target) { void **pptr = (...
Howard Thomson's user avatar
0 votes
2 answers
227 views

Eiffel Studio ARM Apple Silicon M1

I am hoping to create some software with Eiffel & Eiffel Studio I have a Mac mini with the Apple M1 Arm Processor. Is there a port of EiffelStudio to native Mac M1? Does Eiffel Studio support ...
guest's user avatar
  • 41
1 vote
1 answer
86 views

EiffelStudio finalize with contracts enabled

How to produce the Finalized executable with contract checking enabled? It is possible to keep the check statements intact, but can we keep all the pre/postconditions and class invariants? I need this ...
Ilgiz Mustafin's user avatar
1 vote
1 answer
84 views

Implementing a common attribute in recursive data type like TREE

When implementing a recursive data structure like TREE, I need a common attribute per TREE, and I wonder how to implement it: Adding the attribute to a TREE node, replicates the attribute for every ...
U. Windl's user avatar
  • 4,315
3 votes
3 answers
97 views

Result attached or exception

Let's say that I have a function f which should return an attached T by calling g. However, g returns a detachable T. If g results in a Void, I want to raise an exception like this: f: T do if ...
Ilgiz Mustafin's user avatar
1 vote
1 answer
99 views

Exit program in Eiffel

Is there a way in Eiffel to exit a program, possible with a defined exit code like exit in C? In my case I would like to just end the program like exit(0) would do.
Ilgiz Mustafin's user avatar
1 vote
2 answers
90 views

referencing typed element of tuple

Discovering late (used to define classes instead) TUPLES and looking through the documentation I was wondering if there is a mechanism to get the right type of a given TUPLE. The goal is both ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
45 views

rescue how to raise further or forget an exception

How do I raise an exception further in eiffel? I have 3 cases I want to retry a_feature local l_retries_count: INTEGER do some_potential_failing_feature rescue if ...
Pipo's user avatar
  • 5,073
1 vote
1 answer
129 views

How to inherit from HASH_TABLE in Eiffel?

I want to make a derived class of HASH_TABLE which implements a few additional features. I tried implementing it like this: class HASH_TABLE2[G->HASHABLE] inherit HASH_TABLE[G,G] rename ...
Miklos's user avatar
  • 101
2 votes
2 answers
29 views

how to retreive the value of a custom header into a WSF_REQUEST

I'm looking how to get a custom header value from a received WSF_REQUEST. I read the docs quickly and didn't find the answer. 'Authorization': 'Bearer my_long_token'
Pipo's user avatar
  • 5,073
1 vote
0 answers
177 views

How to compile using EiffelStudio? VD43 Precompiled file is missing or unreadable (...)/driver.exe - External C compilation failed

After installing EiffelStudio I can't compile and run any project because I always get VD43 warning and C Compiler Error. 2 VD43 Precompiled file is missing or unreadable. File 'c:\users\username\...
Miklos's user avatar
  • 101
1 vote
1 answer
37 views

How to enable debug into estudio

I tried to enable the debug syntax into estudio without afording it. In this case it is from a library and it doesnt enter into the debug io.put_string ("any debug statement here") end ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
27 views

Strategy to reuse created DB_SERVICES and other instances into an EWF_APP by thread

Into my EWF_APP[EWF_APP_EXECUTION] the EWF_APP_EXECUTION inherits from WSF_FILTERED_ROUTED_EXECUTION defining setup_router. To be able to access informations globally by thread (as far as I understand ...
Pipo's user avatar
  • 5,073
0 votes
0 answers
38 views

how could a check not been done with all assertions set to true?

Running a debug session with estudio with all assertions set to true (I checked into cluster, common target, specific target, etc.) pass over a check assertion? I also tried to remove EIFGENs and ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
28 views

where rescue should be called in an EWF_APP to be able to close a database connection

Inheriting from WSF_FILTERED_ROUTER_EXECUTION I redefine the clean to be able to close DB Connections. But when there is an assertion failure, I don't know where to call the clean on a rescue clause. ...
Pipo's user avatar
  • 5,073
0 votes
2 answers
47 views

READABLE_STRING_GENERAL vs STRING

When to use which type of STRING in eiffel? I saw using READABLE_STRING_GENERAL and having to l_readable_string.out' to convert it to STRING`
Pipo's user avatar
  • 5,073
0 votes
1 answer
71 views

number of seconds since epoch in eiffel for a DATE_TIME object

how would you calculate the number of seconds since epoch in eiffel for a DATE_TIME object? What is the proper way to do it with the current libraries?
Pipo's user avatar
  • 5,073
0 votes
2 answers
42 views

how would you calculate the number of seconds since epoch in eiffel for a DATE_TIME object

how would you calculate the number of seconds since epoch in eiffel for a DATE_TIME object?
Pipo's user avatar
  • 5,073
0 votes
1 answer
372 views

Understanding Eiffel loop variant/invariant

I was trying to have a structure which talks himself about variants and invariants into Eiffel loops, but don't understand the variant part! from l_array := <<1,2,30,60>> l_index :=...
Pipo's user avatar
  • 5,073
0 votes
1 answer
45 views

What is the best way to declare a constant into a class that can be redefined

What is in eiffel the best way to have a constant which can be redefined? class A => color: STRING = "green" color B inherit A => cannot redefine while having a function which only ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
65 views

eiffel: cluster has two classes with the same name

How to deal with cluster has two classes with the same name with eiffel studio? when I want to choose between 2 versions? Where can I find documentation about that? Think that there is a trick with ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
39 views

eiffel: a statement for explicitly executing code when assertions are on

Sometimes the checks and contract constructions need an elaboration which wants to be avoided when assertions removed to improve performances and avoid doing useless things with the "only" ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
88 views

How do I get agents to work in {ARRAY}.do_if in Eiffel?

I am trying to iterate an array in Eiffel. And select some elements, using do_if. What I have tried. my_method (list:ARRAY[INTEGER]) local low : ARRAYED_LIST[INTEGER] piv : INTEGER ...
ctrl-alt-delor's user avatar
1 vote
2 answers
54 views

How can I get more information when debugging a contract violation that checks for equality

I have the following Eiffel code. I am doing test-driven-design with contracts. check sorter.sorted (<<1>>).is_equal (<<1>>) end The code correctly detects that my sort ...
ctrl-alt-delor's user avatar
1 vote
1 answer
97 views

eiffel across an_iterable as vs is

I didn't find the documentation about the difference between is and as I'd like to implement an iterator something similar to this MAP, I'd like to know what TYPE is returned with the is keyword and ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
40 views

eiffel: type is based on unknown class (even when visible into libraries)

Trying to include a library I just created I'm unable to have the Class available even if it appears into the libraries on the group view of eiffel studio ../thirdparty/moon_time/sunriset_lib.ecf &...
Pipo's user avatar
  • 5,073
0 votes
1 answer
43 views

eiffel: semantic of ANY default

Surprised that Default in class ANY is frozen and without implementation???, what is the semantic for this function?? Class ANY frozen default: detachable like Current -- Default value of ...
Pipo's user avatar
  • 5,073
0 votes
2 answers
41 views

eiffel type conformance and attachement check not working

Trying to solve one of the SCOOP consequences with make_from_separate I'm running into an issue where at runtime types seem to be the same and won't pass the attached statement. non_separate_from_any ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
29 views

non-compatible actual argument in feature call in collection make_from_separate

Don't understand where I'm wrong here... class LINKED_LIST_SEP[G] inherit LINKED_LIST [G] create make, make_from_iterable, make_from_separate feature {NONE} -- Initialization ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
20 views

The class inherits two different generic derivations of the same class

What is the proper way of precising the type of an iterable through inheritence. as inherit FOO[like babar] is not alowed FOO class FOO inherit ITERABLE[detachable ANY] -- I know garbage but ...
Pipo's user avatar
  • 5,073
0 votes
0 answers
27 views

non-compatible actual argument in feature call with generic separate arguments. A way to use anchored type?

As far as I understand, separate does not conform to non separate non separate conforms to separate so, that's the reason the compiler complains when I say like Current, when the P and S I ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
77 views

Is it possible to make a create which returns a boolean

hi i dont know if i asked the question clearly. i have a deferred class "animal" which contains two features : "bite" (this returns a boolean -> bite:BOOLEAN) and "speak"(speak(word:BOOLEAN)). now ...
du7ri's user avatar
  • 332
0 votes
1 answer
43 views

estudio does not check `require` when it should?

Eiffel Studio seems to pass through my requirements even if I have them enabled on project settings. And as far as I remember I was able some time to put a break point into the requirements... I don'...
Pipo's user avatar
  • 5,073
0 votes
1 answer
29 views

Two different configuration files share the same UUID. In configuration

Don't understand this message and neither how to fix it under estudio 19.12 Warning code: VD80 Configuration warning Two different configuration files share the same UUID. In configuration: /home/...
Pipo's user avatar
  • 5,073
0 votes
1 answer
66 views

Eiffel avoiding duplicates into ecf file

I have duplicate classes into a used library. How can I specify on the ecf file that I want to exclude a path? Error code: VD71 Configuration error Duplicate class: BASIC /home/pg/data/solarity/sit-...
Pipo's user avatar
  • 5,073
0 votes
1 answer
57 views

Passing anonymous object of derived class to a routine in Eiffel

Assuming that we have: class A ... class B inherit A ... f (a_a: A) ... Then, can you write something like the following pseudocode, without using a temporary variable? -- `y` is an argument to B'...
Eleno's user avatar
  • 3,016
0 votes
2 answers
72 views

Sharing a type with a generic class?

How do you declare a variable to be the same type as a type parameter used to instantiate a generic class? The following code does not compile: class TEST [G, H -> INTEGER] feature f (i:...
Eleno's user avatar
  • 3,016
0 votes
0 answers
155 views

Eiffel failure on OS X - Eiffel cannot find library

I use macOS Catalina, and installed EiffelStudio per instructions on the EiffelStudio install page. When I executed estudio on the command line, I got this error $ estudio dyld: Library not loaded: /...
user3161399's user avatar
0 votes
1 answer
62 views

Eiffel separate object into ensure statement

Is there a way to have a separate object to be checked as ensure with the separate obj as l_obj statement? I guess having a boolean function should work. Any reason for that I don't understand? ...
Pipo's user avatar
  • 5,073
1 vote
1 answer
200 views

Error code: VUTA(3) Error: separate target of the Object_call is not controlled

I'm a complete beginner to Eiffel and I'm implementing a linked list as an exercise. I get the following error in the feature has (which tells you if the list contains v). Error code: VUTA(3) Error: ...
Felipe Vega's user avatar
0 votes
1 answer
29 views

Implementation contraint: The class feature only_from_type uses an inline agent

Is there a semantic behind not being able to have an agent into a ensure class routine or is it a current compiler restriction? only_from_type (some_items: CHAIN[like Current]; a_type: detachable ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
61 views

variable is not properly set after renaming into heir

I know how to fix it (see my solution @bottom) but don't understand why this compilation error occurs, as in my mind, renamed attributes should be created by the Precursor into default_create. Why isn'...
Pipo's user avatar
  • 5,073
0 votes
1 answer
46 views

How can I run a cursor tree in Eiffel?

I need a cursor tree and I found CURSOR_TREE and RECURSIVE_CURSOR_TREE classes in EiffelStudio but they are deferred and I don't know how to implement them. Isn'it strange?
B3nTek's user avatar
  • 7
1 vote
1 answer
53 views

check with no content at runtime without assertions

As far as I understood in Eiffel, the following code without assertions fails if the statement returns False check i_m_alive: i.alive then do_nothing end Maybe I'm badly using it but ...
Pipo's user avatar
  • 5,073
0 votes
1 answer
42 views

How to declare an INTEGER_64 from number?

How to declare an INTEGER_64 from a declared number? ("3000000000").to_integer_64 is the only way I found
Pipo's user avatar
  • 5,073

1
2 3 4 5 6