Can a Pointer be Global?
I need to use pointers in procedures (from where imported functions are called) and do not want to pass them as parameters, but instead have access to them as global.
It works fine as long as I have the call for the imported function in the main program, but when I move ...
Search found 16 matches
- Wed Apr 09, 2008 1:20 pm
- Forum: Coding Questions
- Topic: Global Pointers
- Replies: 2
- Views: 824
- Tue Apr 08, 2008 4:30 pm
- Forum: Coding Questions
- Topic: Block Remark
- Replies: 2
- Views: 555
Block Remark
Is there anything similar to block remark /* this is a remark */ in PB?
I'm mising it to remark several lines of code instead of adding a semicolon before each line.
I'm mising it to remark several lines of code instead of adding a semicolon before each line.
- Sun Apr 06, 2008 8:34 am
- Forum: Coding Questions
- Topic: Combining characters from different fonts
- Replies: 5
- Views: 1999
ANSI encoding
Thanks for the example
Is ANSI-encoding only available in the EditorGadget, or?
If so, then is it possible to "lock" the text so that it's NOT editable? (as I only want to present text).
Is ANSI-encoding only available in the EditorGadget, or?
If so, then is it possible to "lock" the text so that it's NOT editable? (as I only want to present text).
- Sat Apr 05, 2008 8:17 pm
- Forum: Coding Questions
- Topic: Combining characters from different fonts
- Replies: 5
- Views: 1999
Combining characters from different fonts
I want to create a string of characters from different fonts to be printed into a suitable gadget (preferable a TextGadget, but if that's not possible any other gadget for presenting text in a window is acceptable). For instance, one character from the font Courier followed by a character from the ...
- Sat Apr 05, 2008 10:25 am
- Forum: Coding Questions
- Topic: How to set TAB positions in a TextGadget
- Replies: 1
- Views: 983
How to set TAB positions in a TextGadget
Is there any way to set the TAB positions in a TextGadget, so when CHR(9) for Tabulated positioning is sent, the printed text appear at the right, pre-defined tabulated positions?
- Sat Apr 05, 2008 8:45 am
- Forum: Coding Questions
- Topic: MultiLine StaticText
- Replies: 3
- Views: 827
Different fonts in a TextGadget
Thanks!
BTW. Is it possible to combine different fonts in a string that is printed in a TextGadget?
BTW. Is it possible to combine different fonts in a string that is printed in a TextGadget?
- Fri Apr 04, 2008 3:49 pm
- Forum: Coding Questions
- Topic: MultiLine StaticText
- Replies: 3
- Views: 827
MultiLine StaticText
What is the equivalent to the object "StaticText" (MultiLine) that is found in VisualBasic? I cannot see anything similar in the "Visual Designer". Is there any better designer tool than "Visual Designer"?
- Wed Apr 02, 2008 9:58 am
- Forum: Coding Questions
- Topic: Exit from Procedure
- Replies: 4
- Views: 928
More than one ProcedureReturn
Ok, thanks.
So this mean that it's possible to have more than one (1) line with ProcedureReturn in a subroutine.
So this mean that it's possible to have more than one (1) line with ProcedureReturn in a subroutine.
- Wed Apr 02, 2008 9:31 am
- Forum: Coding Questions
- Topic: Exit from Procedure
- Replies: 4
- Views: 928
Exit from Procedure
What is the equivalent to "EXIT SUB", that is, how to exit from a subroutine before reaching the EndSubroutine. The "Break" command only exit from the current loop. And "Break #" (where # is the number of the nested loop) only exit from the that number of nested loops. I prefer not to use "Goto ...
- Tue Apr 01, 2008 1:49 pm
- Forum: Coding Questions
- Topic: Fraction part of a double
- Replies: 7
- Views: 1434
fraction of a double
Mathematically speaking you're right. But Since the integer part of the number shows the signum (+/-) of the number there's no need for the fractional part of the same number to show this.
- Mon Mar 31, 2008 4:12 pm
- Forum: Coding Questions
- Topic: Fraction part of a double
- Replies: 7
- Views: 1434
Procedure Fraction
Thanks. I realised that there was no inbuilt function for this so I wrote a procedure as follows...
Procedure.d Fraction (innumber.d)
absnumber.d = Abs (innumber.d)
fraction.d = absnumber - Round (absnumber, 0)
ProcedureReturn fraction.d
EndProcedure
...since it must work with negative ...
Procedure.d Fraction (innumber.d)
absnumber.d = Abs (innumber.d)
fraction.d = absnumber - Round (absnumber, 0)
ProcedureReturn fraction.d
EndProcedure
...since it must work with negative ...
- Mon Mar 31, 2008 3:05 pm
- Forum: Coding Questions
- Topic: Fraction part of a double
- Replies: 7
- Views: 1434
Fraction part of a double
Is there any simple way to get the fraction part out from a double?
The result must be a double as well.
The result must be a double as well.
- Sun Mar 30, 2008 12:21 am
- Forum: Coding Questions
- Topic: Problem with IntQ
- Replies: 2
- Views: 715
Problem with IntQ
Can anyone explain the following?
---------------------------
OpenConsole()
tmp.d = 195.0344317566
PrintN (StrD (tmp.d) )
---------------------------
; will print: "195.0344317566" which is correct
; but if I now want the integer part and the decimal part in two separate
; variables I try with ...
---------------------------
OpenConsole()
tmp.d = 195.0344317566
PrintN (StrD (tmp.d) )
---------------------------
; will print: "195.0344317566" which is correct
; but if I now want the integer part and the decimal part in two separate
; variables I try with ...
- Tue Mar 25, 2008 12:03 pm
- Forum: Coding Questions
- Topic: Calling external functions
- Replies: 7
- Views: 2739
Returning arrays of long
Yes, the return value is a long, which in this case is a value to control if the calculations within the functions was done correctly or not.
However, I must also be able to read some of the parameters (here delcared as Global), which have been calculated within the function, and especially the ...
However, I must also be able to read some of the parameters (here delcared as Global), which have been calculated within the function, and especially the ...
- Tue Mar 25, 2008 11:32 am
- Forum: Coding Questions
- Topic: Calling external functions
- Replies: 7
- Views: 2739
Functions returning array of double
It can be done in C and it can be done Visual Basic, so I don't understand why PureBasic cannot handle this - returning an array of doubles from an external function call.
I had the impression that PB would be a more sophisticated language than VB, but apparently not. Or?
Is this a problem with ...
I had the impression that PB would be a more sophisticated language than VB, but apparently not. Or?
Is this a problem with ...