Search found 1113 matches

by cogier
Monday 19th June 2023 2:18pm
Forum: Beginners
Topic: Cannot get it running on Debian 12
Replies: 10
Views: 2074

Re: Cannot get it running on Debian 12

Welcome to the forum.

If you run 'gambas3' in terminal, do you get any errors? If so, can you post them.
by cogier
Sunday 18th June 2023 1:31pm
Forum: General
Topic: Change the working directory not possible
Replies: 3
Views: 881

Re: Change the working directory not possible

I have project that needs to wander around a set of related directories and process the files therein. I would create a new folder as your 'working directory' e.g. Public sPath As String = User.Home &/ "MyNewFolder" Public Sub Form_Open() If Not Exist(sPath) Then Mkdir sPath End Then ...
by cogier
Thursday 15th June 2023 2:06pm
Forum: Beginners
Topic: UnHtml$()
Replies: 4
Views: 1251

Re: UnHtml$()

Hi, is there a reverse function to the Html$()-function? Thanks! Experimenting with the tricks Bruce posted, I came up with this: - Public Sub Form_Open() Dim sHtml As String = "Charlie was 'ere!" sHtml = Html(sHtml) Print sHtml sHtml = String.FromHTML(sHtml) Print sHtml End The result: -...
by cogier
Sunday 11th June 2023 11:00am
Forum: General
Topic: File pattern
Replies: 10
Views: 3679

Re: File pattern

thatbruce. I tried exactly the same 'solution'. vuott said it didn't work for him, and, unfortunately, it didn't work for me either. vuott. Your "*.*g" is a good workaround but is a bit hit-and-miss. I tried to use regexp, but I don't know the syntax well enough. I won't understand it if ...
by cogier
Saturday 10th June 2023 2:24pm
Forum: General
Topic: File pattern
Replies: 10
Views: 3679

File pattern

Can someone tell me how to get this syntax correct, as the example below does not work. I have tried various things, but so far I have failed!

sDir = Dir(sPath, "*.jpg", "*.jpeg", "*.png", gb.File)
by cogier
Monday 5th June 2023 2:17pm
Forum: Beginners
Topic: Rounding to two decimal places without Round
Replies: 14
Views: 3128

Re: Rounding to two decimal places without Round

What is misrepresented here is f(x) returns a value that can be interpreted as a variable on the left hand side of the assignment and therefor be a valid assignment. Think this way, if fNum was a Float[] then you would not expect fNum=Int(1.234) to work but fnum=[Int(1.234)] should. There are many ...
by cogier
Sunday 4th June 2023 1:39pm
Forum: Beginners
Topic: Rounding to two decimal places without Round
Replies: 14
Views: 3128

Re: Rounding to two decimal places without Round

On the other hand, Cogier you have managed with your last reflection to make my neurons a mess. But what question are you asking? Sorry, I was not trying to fry your brain! :D The purpose of Int is to create an Integer . So how can it return a Float ? The difference between Int() and CInt() is: Int...
by cogier
Saturday 3rd June 2023 11:12am
Forum: Beginners
Topic: Rounding to two decimal places without Round
Replies: 14
Views: 3128

Re: Rounding to two decimal places without Round

I found this here: -

The difference between Int() and CInt() is:

Int() may return a Float value, CInt() is limited to 32 bit Integer.
Int() rounds to the next lower value. i.e. -4.6 to -5, while CInt rounds towards 0 i.e. -4.6 to -4



How does Int return a Float value?
by cogier
Thursday 1st June 2023 9:21am
Forum: Beginners
Topic: Rounding to two decimal places without Round
Replies: 14
Views: 3128

Re: Rounding to two decimal places without Round

My solution would be: -

Print Int(2000.5354 * 100) / 100
by cogier
Monday 22nd May 2023 3:55pm
Forum: The Gambas IDE
Topic: How to run the IDE with QT
Replies: 12
Views: 7196

Re: How to run the IDE with QT

Well no. If you go to the "About gambas" window you can see what component is used for the ide. The debug menu sets what toolkit to use when testing your project with the ide debugger. OK, but using this trick I can access the Group property, and it makes no difference if I then set it ba...