Page 3 of 21 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 203

Thread: thinBASIC 1.9.16.X

  1. #21
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,778
    Blog Entries
    3
    Rep Power
    691
    Hi Eros,

    thank you so much for 1.9.13.0! Because testing is larger topic, I created new thread here:
    http://www.thinbasic.com/community/s...2254#post92254


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  2. #22
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Philippines
    Age
    47
    Posts
    1,218
    Blog Entries
    1
    Rep Power
    132
    Small thing to report about Array Extract, Help-file documents wrong Syntax for


    Syntax
    (for array of pointer to heap allocated memory areas: each element of MainArray MUST be a DWORD pointer to some memory allocated with HEAP* functions.)



    nRec = ARRAY EXTRACT PTR MainArray, [COLLATE UCASE,] {StartsWith | EndsWith |Contains} ComparisonStringExpression InTo DestinationArray



    life proved it has to be:

    nRec = ARRAY EXTRACT MainArray PTR, [COLLATE UCASE,] {StartsWith | EndsWith |Contains} ComparisonStringExpression InTo DestinationArray
    Last edited by ReneMiner; 14-11-2015 at 14:01.
    [TABLE="class: tblf1 tblf-fullwidth tblf-alternate"]
    [TR]
    [TD][COLOR=#b22222][B][SIZE=1]The limit is[/SIZE][/B][/COLOR][/TD]
    [TD="class: isRelinked"] [COLOR=#0000cd][B][SIZE=1]Imagination[/SIZE][/B][/COLOR][/TD]
    [/TR]
    [/TABLE]

  3. #23
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,131
    Blog Entries
    2
    Rep Power
    10
    Thanks, will fix for next release.
    I'm working on new Tokenizer. As soon as I have something to test I will publish an updated version, hope by tomorrow.
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  4. #24
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,778
    Blog Entries
    3
    Rep Power
    691
    Hi Eros,

    does the SAPI example in SampleScripts work for you with latest Beta? It does not produce any sound here, it seems (Windows 8.1 box)


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  5. #25
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,131
    Blog Entries
    2
    Rep Power
    10
    I have Windows 10.
    I will check this evening when back to home and will let you know.
    A lot of time I do not use that Module.
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  6. #26
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,131
    Blog Entries
    2
    Rep Power
    10
    Under:
    1. Windows 10 physical machine
    2. Windows 7 virtual machine

    all seems OK.
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  7. #27
    sapi example works okay for me in v1.9.16.3
    i have tested it in winxp32 and win 7/64b

  8. #28
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,778
    Blog Entries
    3
    Rep Power
    691
    Thank you, guys!

    I tried again, even with reboot and... nothing.
    But after brief investiagion I can confirm it is not thinBasic issue - something got broken when I update Windows 8 to 8.1.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  9. #29
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,778
    Blog Entries
    3
    Rep Power
    691
    Hi Eros,

    I added unit tests to cover Now, Hour, Minute, Second, Day, Month and Year here:
    https://github.com/ErosOlmi/ThinBASI...elated.tBasicU

    Please note there are 9 failing tests, because:
    - Hour, Minute, Second, Day, Month and Year without parameter still return zero instead of expected value (that is, current value)
    - Hour, Minute, Second are unable to work with string in case it is just like "11:50:25" (but Day, Month, Year is able to work with string without time)

    The first is easy to do (we talked about it earlier), the second... what about making the functions even more flexible with... regex!
    Before you start parsing the values, you can get the appropriate date/time parts this easily:
    #COMPILE EXE
    #DIM ALL
    
    FUNCTION PBMAIN () AS LONG
    
      MSGBOX GetDatePart("Hello Eros, do you remember what happened on 11/08/2014. I do not :D")
      MSGBOX GetTimePart("Ciao, it is 20/11/2015 today, and I am writing this on 12:36:50")
    
    END FUNCTION
    
    FUNCTION GetDatePart(BYVAL inputText AS STRING) AS STRING
      LOCAL position, length AS LONG
      REGEXPR "([0-9]+)/([0-9]+)/([0-9]+)" IN inputText TO position, length
      FUNCTION = MID$(inputText, position, length)
    END FUNCTION
    
    FUNCTION GetTimePart(BYVAL inputText AS STRING) AS STRING
      LOCAL position, length AS LONG
      REGEXPR "([0-9]+):([0-9]+):([0-9]+)" IN inputText TO position, length
      FUNCTION = MID$(inputText, position, length)
    END FUNCTION
    
    ... with this one, we would be able to return date correctly even from normal text. That would bring even more value.
    I am not very strong with regular expressions, but these seem to work!

    I also created documentation for those functions, you should be able to just copy paste:
    Now
    Description
    Returns date time stamp representing current date and time on local computer.

    Syntax
    timeStamp = Now

    Returns
    String

    Parameters

    Remarks
    The time stamp contains two parts, separated by space.
    First part represents date, second part time.

    The overall signature is:
    DD/MM/YYYY hh:mm:ss

    Restrictions
    Will contain invalid date and time, if you have set it wrong on your local computer.

    See also
    Day, Month, Year, Hour, Minute, Second

    Examples
    String dateTimeStamp = Now
    Day
    Description
    Extracts day in month from string containing "DD/MM/YYYY" pattern
    If used without parameter, returns current day in month directly.

    Syntax
    dayNumber = Day(dateTimeStamp)
    dayNumber = Day

    Returns
    Number in range 1..31

    Parameters
    dateTimeStamp String Yes Value conaining DD/MM/YYYY pattern

    Remarks

    Restrictions
    The passed dateTimeStamp must follow the mentioned signature, otherwise incorrect result can be returned.

    See also
    Now, Month, Year, Hour, Minute, Second

    Examples
    Long dayToday = Day(Now)
    Long dayFromString = Day("Let's meet on 12/06/2015")
    Long dayTodayDirect = Day
    Month
    Description
    Extracts month from string containing "DD/MM/YYYY" pattern
    If used without parameter, returns current month directly.

    Syntax
    monthNumber = Month(dateTimeStamp)
    monthNumber = Month

    Returns
    Number in range 1..12

    Parameters
    dateTimeStamp String Yes Value conaining DD/MM/YYYY pattern

    Remarks

    Restrictions
    The passed dateTimeStamp must follow the mentioned signature, otherwise incorrect result can be returned.

    See also
    Now, Day, Year, Hour, Minute, Second

    Examples
    Long currentMonth = Month(Now)
    Long monthFromString = Month("I don't remember what is special about 12/06/2015, do you?")
    Long currentMonthDirect = Month
    Year
    Description
    Extracts year from string containing "DD/MM/YYYY" pattern
    If used without parameter, returns current year directly.

    Syntax
    yearNumber = Year(dateTimeStamp)
    yearNumber = Year

    Returns
    Number

    Parameters
    dateTimeStamp String Yes Value conaining DD/MM/YYYY pattern

    Remarks

    Restrictions
    The passed dateTimeStamp must follow the mentioned signature, otherwise incorrect result can be returned.

    See also
    Now, Day, Month, Hour, Minute, Second

    Examples
    Long currentYear = Year(Now)
    Long yearFromString = Year("Thinking of 12/06/2015...")
    Long currentYearDirect = Year
    Hour
    Description
    Extracts hour from string containing "hh:mm:ss" pattern
    If used without parameter, returns current hour directly.

    Syntax
    hourNumber = Hour(dateTimeStamp)
    hourNumber = Hour

    Returns
    Number in range 0..23

    Parameters
    dateTimeStamp String Yes Value containing pattern hh:mm:ss

    Remarks

    Restrictions
    The passed dateTimeStamp must follow the mentioned signature, otherwise incorrect result can be returned.

    See also
    Now, Day, Month, Year, Minute, Second

    Examples
    Long currentHour = Hour(Now)
    Long hourFromString = Hour("I woke up today around 11:50:25")
    Long currentHourDirect = Hour
    Minute
    Description
    Extracts minute from string containing "hh:mm:ss" pattern
    If used without parameter, returns current minute directly.

    Syntax
    minuteNumber = Minute(dateTimeStamp)
    minuteNumber = Minute

    Returns
    Number in range 0..59

    Parameters
    dateTimeStamp String Yes Value containing pattern hh:mm:ss

    Remarks

    Restrictions
    The passed dateTimeStamp must follow the mentioned signature, otherwise incorrect result can be returned.

    See also
    Now, Day, Month, Year, Hour, Second

    Examples
    Long currentMinute = Minute(Now)
    Long minuteFromString = Minute("It was around 11:50:25, or not?")
    Long currentMinuteDirect = Minute
    Second
    Description
    Extracts second from string containing "hh:mm:ss" pattern
    If used without parameter, returns current second directly.

    Syntax
    secondNumber = Second(dateTimeStamp)
    secondNumber = Second

    Returns
    Number in range 0..59

    Parameters
    dateTimeStamp String Yes Value containing pattern hh:mm:ss

    Remarks

    Restrictions
    The passed dateTimeStamp must follow the mentioned signature, otherwise incorrect result can be returned.

    See also
    Now, Day, Month, Year, Hour, Minute

    Examples
    Long currentSecond = Second(Now)
    Long secondFromString = Second("Current time is like 11:50:25, ... or maybe not")
    Long currentSecondDirect = Second
    Petr
    Last edited by Petr Schreiber; 20-11-2015 at 13:47.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  10. #30
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,778
    Blog Entries
    3
    Rep Power
    691
    Eros,

    I added further unit tests for APP_*, ARRAY SORT and COMM fixes and enhancements added in 1.9.16.x - passing, no further issues found =
    If you could just have a look at those Date/Time mini-issues mentioned above, we could have "clean table" to continue with further


    Petr

    P.S. I really wanted to be more productive this weekend, but then... Battlefront happened :P
    Last edited by Petr Schreiber; 22-11-2015 at 00:40.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

Page 3 of 21 FirstFirst 1234513 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •