I should add that I want to generate the default values from the start again.
Randomize Timer doesn't reset the values to the default.
Search found 30 matches
- Oct 09, 2023 4:57
- Forum: General
- Topic: Reset Random Numbers
- Replies: 9
- Views: 1912
- Oct 07, 2023 16:56
- Forum: General
- Topic: Reset Random Numbers
- Replies: 9
- Views: 1912
Reset Random Numbers
Hello. When my program starts, and the Rnd() function is called, the values returned are always the same. But how do I re-seed the random number generator to generate those same values again, as if the program started again? I've tried different Randomize parameters, and none of them reset the value...
- May 26, 2023 18:15
- Forum: DOS
- Topic: Chain/Exe/Run Problem
- Replies: 4
- Views: 2026
Chain/Exe/Run Problem
In FreeBASIC when I use the Chain/Exe/Run functions it won't run the other problem, but instead sometimes it overwrites some memory of the current program and freezes, or it corrupts some of the screen but mostly does nothing. And when I use the shell command, it's the same or it says "Insuffic...
- May 05, 2023 1:35
- Forum: DOS
- Topic: (Basic Question) DIR Not Working
- Replies: 7
- Views: 2762
(Basic Question) DIR Not Working
In FreeBASIC, when I use this code: Dir("C:\prmpt\*") For tt As UInteger = 0 To 10 ?Dir() + " (File)" Next It doesn't work (C:\prmpt\ is the directory for it, in FreeDOS). I have a directory listing routine that lists the subdirectories, but it won't list files. Any advice? Thanks
- Jul 15, 2022 19:09
- Forum: General
- Topic: (Windows) Launch/Close Programs With Fullscreen
- Replies: 2
- Views: 528
Re: (Windows) Launch/Close Programs With Fullscreen
Workaround on Windows: The only and best solution I've found to force a window to the foreground with the focus, whatever the starting configuration, is to run the 5 following commands in this order: - Hide (not absolutely necessary, just to reduce a little the window flashing) - Minimize - Restore...
- Jul 15, 2022 2:11
- Forum: General
- Topic: (Windows) Launch/Close Programs With Fullscreen
- Replies: 2
- Views: 528
(Windows) Launch/Close Programs With Fullscreen
Hey. I've been wondering: When the CHAIN command is used to launch another program, and then the program closes, when a fullscreen mode is used at least for the original program, the program won't do anything until the user switches it back to active again, such as by clicking it in the taskbar. Is ...
- Aug 17, 2021 3:25
- Forum: General
- Topic: Memory Address of Default Font
- Replies: 2
- Views: 656
Re: Memory Address of Default Font
Thanks!angros47 wrote:Yes, there is. I posted an example few days ago here: viewtopic.php?f=7&t=29516&p=284481#p284481
I hope it's what you are looking for
- Aug 16, 2021 23:29
- Forum: General
- Topic: Memory Address of Default Font
- Replies: 2
- Views: 656
Memory Address of Default Font
Is there a way to get a pointer to the address of the default font? I don't want to have to use DRAW STRING to use a custom font. Thanks.
- Jul 20, 2021 18:31
- Forum: General
- Topic: Poke Modifying Previous Address' Value
- Replies: 24
- Views: 2143
Re: Poke Modifying Previous Address' Value
position 320 is not a uinteger up from position 319, it is a byte up. you could cast Dim memm As Any ptr memm = allocate(1024 * 512) #define mem cptr(uinteger ptr,memm) ?"Memm Is the allocated memory pointer." ?"Address memm+319 before poking memm+320: "&Peek(uinteger,mem+31...
- Jul 20, 2021 17:06
- Forum: General
- Topic: Poke Modifying Previous Address' Value
- Replies: 24
- Views: 2143
Re: Poke Modifying Previous Address' Value
First code: My God, no comment! For the second code: 'memm' is an Any Ptr, but you work with Uinteger data. Think about it a bit with this slightly modified example from yours: Dim memm As Any ptr memm = allocate(1024 * 512) ?"Memm Is the allocated memory pointer." ?"Address memm+319...
- Jul 20, 2021 16:57
- Forum: General
- Topic: Poke Modifying Previous Address' Value
- Replies: 24
- Views: 2143
Re: Poke Modifying Previous Address' Value
First code: My God, no comment! For the second code: 'memm' is an Any Ptr, but you work with Uinteger data. Think about it a bit with this slightly modified example from yours: Dim memm As Any ptr memm = allocate(1024 * 512) ?"Memm Is the allocated memory pointer." ?"Address memm+319...
- Jul 20, 2021 16:31
- Forum: General
- Topic: Poke Modifying Previous Address' Value
- Replies: 24
- Views: 2143
Re: Poke Modifying Previous Address' Value
Dim memm As Any ptr memm = allocate(1024 * 512) ?"Memm Is the allocated memory pointer." ?"Address memm+319 before poking memm+320: "&Peek(UInteger,memm+319) Poke UInteger,memm+320,10 ?"Address memm+319 after poking memm+320: "&Peek(UInteger,memm+319):Sleep:Sys...
- Jul 20, 2021 16:26
- Forum: General
- Topic: Poke Modifying Previous Address' Value
- Replies: 24
- Views: 2143
Re: Poke Modifying Previous Address' Value
Sorry, the posted code-fragment makes "no sense at all" as it is. Why don't elaborete some more, about "what you want to achieve" with the code? Alternatively, post the whole code, that deals with the issue ... #LANG "fblite" option gosub #include "file.bi" d...
- Jul 20, 2021 16:12
- Forum: General
- Topic: Poke Modifying Previous Address' Value
- Replies: 24
- Views: 2143
Re: Poke Modifying Previous Address' Value
ok i will post more soon
- Jul 20, 2021 16:03
- Forum: General
- Topic: Poke Modifying Previous Address' Value
- Replies: 24
- Views: 2143
Poke Modifying Previous Address' Value
(I'm using a 32 bit computer and 32 bit FB. I also have indeed used allocate beforehand)
When I use poke on an address, the previous address is modified.
pointer + 319 is 0 before the poke.
Thanks
When I use poke on an address, the previous address is modified.
Code: Select all
Poke UInteger, pointer + 320,10
Print Peek(UInteger, pointer + 319)
Thanks