Results 1 to 7 of 7

Thread: Proment modul

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    941
    Rep Power
    111

    Proment modul

    Hello all

    Perhaps some Guys May Test this new Module for thinbasic

    I have written proment during Corona time but First start was already in 2017...

    A Test File you can find in rar package below

    Place proment.dll and thinbasic_proment.dll in Lib folder so all must Work I Hope so
    All written in freebasic and oxgenbasic

    uses "proment"
    
    string pros
    
    pros="
    long a,b,c
    
    a=365 : b=2023  : c=a*b+31
    
    print "Hello myWorld! Our days on earth: "+c
    'result: 738426
    "
    ha_basis pros
    ha_drive
    


    Regards frank
    Attached Files Attached Files
    Last edited by Lionheart008; 30-01-2024 at 22:00.
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,813
    Rep Power
    10
    Ciao Frank,


    can you please give more info on what this module is about?
    Which a re the functions, what they do and what is the syntax to call them?


    Thanks
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #3
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    941
    Rep Power
    111
    Yes wait please some days more to come soon ciao Frank
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  4. #4
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    941
    Rep Power
    111
    Hello again Made some Progress on freebasic site and my Editor is nearly ready

    Here are two new examples with proment Module
    I have added a short Legend too. More to come later... Thx

     
    
    
    '
    ' - short "proment" module legend for simple examples using thinbasic: 
    ' - a) you need only a string to start, b) code example with usual types, dim, float, long, string, arrays etcpp,
    ' - c) "ha_basis" at the end and "ha_drive" you need for execution the script example that's all
    ' - jan-feb2024
    '
    uses "proment"
    
    string pros
    
    pros="
    
    'classes 
    
    '1)
    class multiply
      method thor(n as float) as float
        return n*n*n*n
      end method
    end class
    
    dim multiply ui
    print ui.thor 4 'result: 256
    
    '2)
    class multiply
      method thor(k as float,p as float) as float
        return k*k*k*p*p*p
      end method
    end class
    
    dim multiply loky
    print loky.thor(4,8) 'result: 32768
    
    "
    ha_basis pros
    ha_drive
    
    Attached Files Attached Files
    Last edited by Lionheart008; 10-02-2024 at 21:27.
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  5. #5
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    941
    Rep Power
    111
    And Here a little Speed Test adapted from oxygen Site

    '
    ' - short "proment" module legend for simple examples using thinbasic: 
    ' - a) you need only a string to start, b) code example with usual types, dim, float, long, string, arrays etcpp,
    ' - c) "ha_basis" at the end and "ha_drive2" you need for execution the script example that's all
    ' - jan-feb2024
    '
    uses "proment"
    
    string pros
    
    pros="
    
    'timer example with array redim
    
    Type SYSTEMTIME
         word wYear
         word wMonth
         word wDayOfWeek
         word wDay   
         word wHour   
         word wMinute
         word wSecond
         word wMilliseconds
    End Type
    
    Declare GetSystemTime LIB "KERNEL32.DLL" ( SYSTEMTIME *lpSystemTime )
    Declare GetLocalTime  Lib "kernel32.dll" ( ByRef lpSystemTime As SYSTEMTIME )
    
      function TimeLapsesMis(SYSTEMTIME *ti1,*ti2) as long
      ===============================================
      '<60 second timer
      long tad = ti2.wMilliSeconds-ti1.wMilliseconds+
      ((ti2.wSecond-ti1.wSecond)*1000)+
      ((ti2.wMinute-ti1.wMinute)*60000)+
      ((ti2.wHour-ti1.wHour)*3600000)+
      ((ti2.wDayOfWeek-ti1.wDayOfWeek)*86400000)
      '
      'end of week crossing
      if tad<0 then tad+=604800000
      return tad
      end function
    
    '---Variables declaration
    dim MaxCount  as long
    maxCount = 1e7 '10 million
    'maxCount = 10000000
    SYSTEMTIME   thisTime0
    SYSTEMTIME   thisTime1
    
    '---Start time
    GetSystemTime thisTime0
    
    '---Dimension the array
    redim int MyArray(maxcount) 
    ' int=long integer 32 bit
    
    dim count as long
    '---Fill the array
    for Count = lbound(MyArray) to ubound(MyArray)
      MyArray(Count) = Count*Count '^2
    next
    '---End time
    GetSystemTime thisTime1
    
    'format 'str better here
    print "total time to fill an EXT array of " + MaxCount + " elements: " + str(TimeLapsesMis(thisTime0,thisTime1), "###") + " msecs"
    
    "
    ha_basis pros
    ha_drive
    
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  6. #6
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    941
    Rep Power
    111

    Arrays and Type example with proment / thinbasic

    Here are two examples in one Script

    Array and Type example

    '--- Script created on 02-12-2024 22:17:39 by frank bruebach
    '--- proment module, thinbasic: two examples: type example + array example
    '
    uses "proment"
    
    string arri
    
    arri="
      ' type example
      '
      type fish64
        a as byte
        b as byte
        c as byte
        dx as byte
        st as string
      end type
      
      dim v as fish64
      
      v.a=16
      v.b=16
      v.c=16
      v.dx=32
      v.st="hai: "
    
      print v.st + hex (v.dx) 'hai: 20
    
      ' array example
      '
      dim as long a(12)=>(2,4,6,8,10,12,14,16,18,20)
      a(12)=a(1)+a(4)+a(6)
      '2+8+12 = 22
    
      print a(12) 'result: 22
    "
    ha_basis arri
    ha_drive
    
    you can't always get what you want, but if you try sometimes you might find, you get what you need

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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