Search found 146 matches

by Peter Muraya
1 Dec 2015 7:10
Forum: Visual Prolog
Topic: Simple list head rest split syntax
Replies: 6
Views: 4036

Kingchris, Vitaly's method is the correct way to get the head of a list, if there is at least one member in it. Your method will work if and only if there are 2 elements in the list -- which I don't think is your intention. class facts filename:(string,string,string,string,core::string_list). clause...
by Peter Muraya
19 Nov 2015 6:13
Forum: Visual Prolog
Topic: Construction throws Access Violation
Replies: 6
Views: 3601

Ok, Martin. Now I know that the first argument of a list comprehension can be, not just a variable but, generally any Prolog term. Without further knowledge about how Prolog implements this internally it is difficult for anyone to see why that should raise the exemption you mentioned.
by Peter Muraya
18 Nov 2015 8:20
Forum: Visual Prolog
Topic: Construction throws Access Violation
Replies: 6
Views: 3601

Martin,
What is this line mean to achieve:-

Code: Select all

listB := [0 || _ in ListA]
..is it to set listB to as many 0's as there are items in ListA, i.e., should it have the same effect as

Code: Select all

listB := [X || _ in ListA, X=0]
?
by Peter Muraya
14 Nov 2015 7:40
Forum: Visual Prolog
Topic: Matrix operations using array2M
Replies: 1
Views: 3037

Frank,
I have not used array2M for matrix operations in the way you suggest, but I have used it as a 2-dimensional buffer of identity key values in an ODBC application that speeds up data access by a factor of more than 10! And I love it.
by Peter Muraya
12 Nov 2015 4:56
Forum: Visual Prolog
Topic: New Features Roadmap
Replies: 4
Views: 3791

Thomas & Martin, Yes, I would welcome this debugging feature of being able to inspect the contents of a collection; it is the lack of this facility that makes me use lists or database facts where other types of collections would have been more appropriate. Here is another one that I would welcome:be...
by Peter Muraya
6 Nov 2015 3:42
Forum: Visual Prolog
Topic: Many days of grief caused by @@ in comments
Replies: 7
Views: 4216

Harrison,
In my case, for large or small classes, the cursor is always placed at the end of the last line in the file for any syntax error after the @@. Syntax errors before the @@ are properly located. Can you share the tiny class you tested?
by Peter Muraya
5 Nov 2015 16:37
Forum: Visual Prolog
Topic: Many days of grief caused by @@ in comments
Replies: 7
Views: 4216

Thomas,

I'm am using build VP 7501

And yes, I mean, the cursor is placed at the end of the last line in the file.

Harrison is right, it is a multi-line comment problem; the single line comment does not have this issue.
by Peter Muraya
5 Nov 2015 7:13
Forum: Visual Prolog
Topic: Many days of grief caused by @@ in comments
Replies: 7
Views: 4216

Many days of grief caused by @@ in comments

Hi Thomas, This sequence of characters, @@, in a comment is messing up with navigation within my code. In the following code, for example, instead of the cursor being placed at the 2 dots to report the syntax error it is placed at the end of the code. In fact any error that occurs after the @@ is ne...
by Peter Muraya
30 Oct 2015 6:12
Forum: Visual Prolog
Topic: bindParamenter issue: [Microsoft][ODBC Microsoft Access Driver]String data, right truncated
Replies: 12
Views: 6103

I guess you would need to set the relevant parameter to null explicitly, e.g.,

Code: Select all

... Stmt:setParameterValue(1, null()), ...
by Peter Muraya
9 Oct 2015 9:09
Forum: Visual Prolog
Topic: Coercing a core::value to another using odbc_native::sqlDataType
Replies: 6
Views: 4840

Thanks Thomas. Do you actually receive such values? I'm working on a data integration project whose sources of raw data are (thousands of) files in Excel, delimited texts, word documents, access database, etc. By far, most of the data is in Excel and I use COM to read them directly (and ODBC to writ...
by Peter Muraya
6 Oct 2015 6:07
Forum: Visual Prolog
Topic: Coercing a core::value to another using odbc_native::sqlDataType
Replies: 6
Views: 4840

Hi,
I have tried to map the comDomains::variant to core::value, but I'm having trouble with

Code: Select all

 
How to you convert:-
- oleCurrency to a real number?
- oldDate to either gmtTimevalue or localTime value?
by Peter Muraya
1 Oct 2015 8:23
Forum: Visual Prolog
Topic: Coercing a core::value to another using odbc_native::sqlDataType
Replies: 6
Views: 4840

Thank you Thomas. My intention was to minimize possibilities of "Data conversion error" by ensuring correct data type matches, but I get your point. I will rely on ODBC to do the conversion; this should work well for database to database transfers. I now have a similar question regarding spreadsheet...
by Peter Muraya
25 Sep 2015 10:41
Forum: Visual Prolog
Topic: Coercing a core::value to another using odbc_native::sqlDataType
Replies: 6
Views: 4840

Coercing a core::value to another using odbc_native::sqlDataType

Hi, I have a problem of transferring data from one odcbc-complilant database to another where the field types are known to be similar but not identical. I'm thinking of a function defined as follows:- coerce:(core::value SourceData, odbc_native::sqlDataType DestinationType)->core::value CoercedValue...
by Peter Muraya
25 Sep 2015 10:07
Forum: Visual Prolog
Topic: Breakpoint properties and conditions
Replies: 9
Views: 5591

Thank you Harrison. When I got this response from Thomas, I searched this forum for further tips on debugging. I found 2 that I think are very useful. The first one was Run in Window which allows me to see outputs without having to always include a readchar()=_ as in this sample:- run() :- X= array2...
by Peter Muraya
24 Sep 2015 5:13
Forum: Visual Prolog
Topic: Breakpoint properties and conditions
Replies: 9
Views: 5591

Thanks Thomas.
I see; with core::nothing(...) my concerns are sufficiently addressed.