Thursday, 8 December 2016

Conversion of Phix to win32lib 0.70.4

Currently Phix is shipped with win32lib 0.60, which doesn't work with the current IDE. SO the project now is to modify win32lib to work with Phix.

First issue
global function w32remainder(object a,object b)
    if sequence(a) then
        for i=1 to length(a) do
            a[i]=remainder(a[i],b)
        end for
        return a
    elsif sequence(b) then
        for i=1 to length(a) do
            b[i]=remainder(a,b[i])
        end for
        return b
    end if
    if compare(a,0.0)=compare(b,0.0) then
        return remainder(a,b)
    else
        return b+remainder(a,b)
    end if
end function

Phix baulks at the type for length - only wants to run lenth() on a sequence, not on an object, which could be an atom or integer.




No comments:

Post a Comment